summaryrefslogtreecommitdiffstats
path: root/libc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/dirent/dirstream.h4
-rw-r--r--libc/misc/glob/glob.c2
-rw-r--r--libc/misc/internals/Makefile.in9
-rw-r--r--libc/misc/pthread/no-tsd.c1
-rw-r--r--libc/misc/pthread/weaks.c1
-rw-r--r--libc/misc/syslog/syslog.c2
-rw-r--r--libc/misc/sysvipc/ipc.h2
-rw-r--r--libc/misc/time/time.c2
-rw-r--r--libc/misc/ttyent/getttyent.c6
9 files changed, 13 insertions, 16 deletions
diff --git a/libc/misc/dirent/dirstream.h b/libc/misc/dirent/dirstream.h
index 2dd0264fc..a90ca6312 100644
--- a/libc/misc/dirent/dirstream.h
+++ b/libc/misc/dirent/dirstream.h
@@ -71,9 +71,9 @@ struct __dirstream {
}; /* stream data from opendir() */
-extern int __getdents(unsigned int fd, struct dirent *dirp, unsigned int count);
+extern ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
#ifdef __UCLIBC_HAS_LFS__
-extern int __getdents64 (unsigned int fd, struct dirent64 *dirp, unsigned int count);
+extern ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
#endif
#endif /* dirent.h */
diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c
index a93cf0ab4..0d788df53 100644
--- a/libc/misc/glob/glob.c
+++ b/libc/misc/glob/glob.c
@@ -426,7 +426,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
if (! (d->d_ino != 0))
continue;
name = d->d_name;
-#ifdef HAVE_D_NAMLEN
+#ifdef _DIRENT_HAVE_D_NAMLEN
len = d->d_namlen;
#else
len = 0;
diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in
index 2916475ec..bfae764e4 100644
--- a/libc/misc/internals/Makefile.in
+++ b/libc/misc/internals/Makefile.in
@@ -6,7 +6,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS-__uClibc_main.c=$(SSP_DISABLE_FLAGS)
+CFLAGS-__uClibc_main.c:=$(SSP_DISABLE_FLAGS)
CSRC:=tempname.c errno.c __errno_location.c __h_errno_location.c
@@ -16,9 +16,7 @@ MISC_INTERNALS_OUT:=$(top_builddir)libc/misc/internals
MISC_INTERNALS_SRC:=$(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC))
MISC_INTERNALS_OBJ:=$(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC))
-STATIC_SRC:=__uClibc_main.c
-
-$(MISC_INTERNALS_OUT)/interp.c: $(MISC_INTERNALS_DIR)/Makefile.in
+$(MISC_INTERNALS_OUT)/interp.c: headers_root
$(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@
$(Q)echo "#include <features.h>" >> $@
$(Q)echo "#ifdef __HAVE_ELF__" >> $@
@@ -29,8 +27,7 @@ $(MISC_INTERNALS_OUT)/interp.c: $(MISC_INTERNALS_DIR)/Makefile.in
libc-a-y+=$(MISC_INTERNALS_OBJ)
libc-so-y+=$(MISC_INTERNALS_OBJ:.o=.os)
libc-shared-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.oS
-libc-static-y+=$(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(STATIC_SRC))
-other-y+=$(MISC_INTERNALS_OUT)/interp.os
+libc-static-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.o
libc-multi-y+=$(MISC_INTERNALS_SRC)
diff --git a/libc/misc/pthread/no-tsd.c b/libc/misc/pthread/no-tsd.c
index ef79cb832..1fabaae68 100644
--- a/libc/misc/pthread/no-tsd.c
+++ b/libc/misc/pthread/no-tsd.c
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define _GNU_SOURCE
#include <bits/libc-tsd.h>
/* This file provides uinitialized (common) definitions for the
diff --git a/libc/misc/pthread/weaks.c b/libc/misc/pthread/weaks.c
index 6767cfffb..b1e067eb4 100644
--- a/libc/misc/pthread/weaks.c
+++ b/libc/misc/pthread/weaks.c
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define _GNU_SOURCE
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c
index 2b478e13d..704336006 100644
--- a/libc/misc/syslog/syslog.c
+++ b/libc/misc/syslog/syslog.c
@@ -254,7 +254,7 @@ vsyslog( int pri, const char *fmt, va_list ap )
/* should mode be `O_WRONLY | O_NOCTTY' ? -- Uli */
if (LogStat & LOG_CONS &&
(fd = open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) {
- p = index(tbuf, '>') + 1;
+ p = strchr(tbuf, '>') + 1;
last_chr[0] = '\r';
last_chr[1] = '\n';
(void)write(fd, p, last_chr - p + 2);
diff --git a/libc/misc/sysvipc/ipc.h b/libc/misc/sysvipc/ipc.h
index a5d443543..c1d4e76c5 100644
--- a/libc/misc/sysvipc/ipc.h
+++ b/libc/misc/sysvipc/ipc.h
@@ -7,7 +7,7 @@
#ifdef __NR_ipc
/* The actual system call: all functions are multiplexed by this. */
-extern int __syscall_ipc __P((int __call, int __first, int __second,
+extern int __syscall_ipc __P((unsigned int __call, int __first, int __second,
int __third, void *__ptr));
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index c315baddc..21c4bb96b 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -1239,9 +1239,7 @@ __XL_ALIAS(strftime)
/**********************************************************************/
#if defined(L_strptime) || defined(L_strptime_l)
-#if defined(L_strptime) || defined(L_strptime_l)
#define ISDIGIT(C) __isdigit_char((C))
-#endif
#ifdef __UCLIBC_DO_XLOCALE
#define ISSPACE(C) isspace_l((C), locale_arg)
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 6e2fbd2f4..d7d77c1ba 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -96,7 +96,7 @@ static char * skip(register char *p)
static char * value(register char *p)
{
- return ((p = index(p, '=')) ? ++p : NULL);
+ return ((p = strchr(p, '=')) ? ++p : NULL);
}
struct ttyent * getttyent(void)
@@ -122,7 +122,7 @@ struct ttyent * getttyent(void)
return (NULL);
}
/* skip lines that are too big */
- if (!index(p, '\n')) {
+ if (!strchr(p, '\n')) {
while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
;
continue;
@@ -171,7 +171,7 @@ struct ttyent * getttyent(void)
tty.ty_comment = p;
if (*p == 0)
tty.ty_comment = 0;
- if ((p = index(p, '\n')))
+ if ((p = strchr(p, '\n')))
*p = '\0';
return (&tty);
}