From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: lfs *64 fixes
Date: Thu, 4 Sep 2014 22:51:07 +0200 [thread overview]
Message-ID: <20140904205107.GE10361@port70.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 17 bytes --]
patches attached
[-- Attachment #2: 0001-add-missing-legacy-LFS-64-symbol-aliases.patch --]
[-- Type: text/x-diff, Size: 3627 bytes --]
From b9047ae239b359a3dc368ac17551b01f027f0ccb Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Thu, 4 Sep 2014 22:01:36 +0200
Subject: [PATCH 1/2] add missing legacy LFS *64 symbol aliases
versionsort64, aio*64 and lio*64 symbols were missing, they are
only needed for glibc ABI compatibility, on the source level
dirent.h and aio.h already redirect them.
---
src/aio/aio_cancel.c | 3 +++
src/aio/aio_error.c | 3 +++
src/aio/aio_fsync.c | 3 +++
src/aio/aio_readwrite.c | 3 +++
src/aio/aio_return.c | 3 +++
src/aio/aio_suspend.c | 3 +++
src/aio/lio_listio.c | 1 +
src/dirent/versionsort.c | 4 ++++
8 files changed, 23 insertions(+)
diff --git a/src/aio/aio_cancel.c b/src/aio/aio_cancel.c
index 5a753b1..16fc431 100644
--- a/src/aio/aio_cancel.c
+++ b/src/aio/aio_cancel.c
@@ -1,6 +1,7 @@
#include <aio.h>
#include <pthread.h>
#include <errno.h>
+#include "libc.h"
int aio_cancel(int fd, struct aiocb *cb)
{
@@ -14,3 +15,5 @@ int aio_cancel(int fd, struct aiocb *cb)
}
return cb->__err==EINPROGRESS ? AIO_NOTCANCELED : AIO_ALLDONE;
}
+
+LFS64(aio_cancel);
diff --git a/src/aio/aio_error.c b/src/aio/aio_error.c
index a780fd3..fd42ea1 100644
--- a/src/aio/aio_error.c
+++ b/src/aio/aio_error.c
@@ -1,6 +1,9 @@
#include <aio.h>
+#include "libc.h"
int aio_error(const struct aiocb *cb)
{
return cb->__err;
}
+
+LFS64(aio_error);
diff --git a/src/aio/aio_fsync.c b/src/aio/aio_fsync.c
index 0ac6ea8..6e1a70a 100644
--- a/src/aio/aio_fsync.c
+++ b/src/aio/aio_fsync.c
@@ -1,5 +1,6 @@
#include <aio.h>
#include <errno.h>
+#include "libc.h"
int aio_fsync(int op, struct aiocb *cb)
{
@@ -7,3 +8,5 @@ int aio_fsync(int op, struct aiocb *cb)
errno = EINVAL;
return -1;
}
+
+LFS64(aio_fsync);
diff --git a/src/aio/aio_readwrite.c b/src/aio/aio_readwrite.c
index 2278226..8753ffd 100644
--- a/src/aio/aio_readwrite.c
+++ b/src/aio/aio_readwrite.c
@@ -105,3 +105,6 @@ int aio_write(struct aiocb *cb)
cb->aio_lio_opcode = LIO_WRITE;
return new_req(cb);
}
+
+LFS64(aio_read);
+LFS64(aio_write);
diff --git a/src/aio/aio_return.c b/src/aio/aio_return.c
index df10bdb..c1ce450 100644
--- a/src/aio/aio_return.c
+++ b/src/aio/aio_return.c
@@ -1,6 +1,9 @@
#include <aio.h>
+#include "libc.h"
ssize_t aio_return(struct aiocb *cb)
{
return cb->__ret;
}
+
+LFS64(aio_return);
diff --git a/src/aio/aio_suspend.c b/src/aio/aio_suspend.c
index 39a1d3a..dcdf601 100644
--- a/src/aio/aio_suspend.c
+++ b/src/aio/aio_suspend.c
@@ -1,6 +1,7 @@
#include <aio.h>
#include <errno.h>
#include "pthread_impl.h"
+#include "libc.h"
/* Due to the requirement that aio_suspend be async-signal-safe, we cannot
* use any locks, wait queues, etc. that would make it more efficient. The
@@ -55,3 +56,5 @@ int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec
}
}
}
+
+LFS64(aio_suspend);
diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c
index 75ed225..bd37767 100644
--- a/src/aio/lio_listio.c
+++ b/src/aio/lio_listio.c
@@ -141,3 +141,4 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
return 0;
}
+LFS64(lio_listio);
diff --git a/src/dirent/versionsort.c b/src/dirent/versionsort.c
index 9769610..410cb70 100644
--- a/src/dirent/versionsort.c
+++ b/src/dirent/versionsort.c
@@ -1,8 +1,12 @@
#define _GNU_SOURCE
#include <string.h>
#include <dirent.h>
+#include "libc.h"
int versionsort(const struct dirent **a, const struct dirent **b)
{
return strverscmp((*a)->d_name, (*b)->d_name);
}
+
+#undef versionsort64
+LFS64(versionsort);
--
1.7.10.4
[-- Attachment #3: 0002-fix-the-macros-for-LFS-64_t-types-in-sys-stat.h.patch --]
[-- Type: text/x-diff, Size: 856 bytes --]
From db94dfb2155f4d83d42c69250e886d05f9194faa Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Thu, 4 Sep 2014 22:14:24 +0200
Subject: [PATCH 2/2] fix the macros for LFS *64_t types in sys/stat.h
there is no blksize64_t (blksize_t is always long) but there are
fsblkcnt64_t and fsfilcnt64_t types.
---
include/sys/stat.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/sys/stat.h b/include/sys/stat.h
index c6abab5..82a6490 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -100,8 +100,9 @@ int lchmod(const char *, mode_t);
#define fstat64 fstat
#define lstat64 lstat
#define fstatat64 fstatat
-#define blksize64_t blksize_t
#define blkcnt64_t blkcnt_t
+#define fsblkcnt64_t fsblkcnt_t
+#define fsfilcnt64_t fsfilcnt_t
#define ino64_t ino_t
#define off64_t off_t
#endif
--
1.7.10.4
next reply other threads:[~2014-09-04 20:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 20:51 Szabolcs Nagy [this message]
2014-09-04 21:04 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140904205107.GE10361@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).