about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile7
-rw-r--r--misc/hsearch_r.c2
-rw-r--r--misc/mntent_r.c8
3 files changed, 11 insertions, 6 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 00f5f785be..e6ad0d06d8 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -55,7 +55,12 @@ routines := brk sbrk sstk ioctl \
 	    efgcvt efgcvt_r qefgcvt qefgcvt_r \
 	    hsearch hsearch_r tsearch lsearch \
 	    err error ustat \
-	    getsysstats force-wrapper
+	    getsysstats
+
+ifneq (,$(filter %REENTRANT, $(defines)))
+routines += force-wrapper
+endif
+
 aux := init-misc
 distribute := bsd-compat.c
 extra-objs := bsd-compat.o
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
index 95813e4bfb..d0fb3e183f 100644
--- a/misc/hsearch_r.c
+++ b/misc/hsearch_r.c
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA.  */
    which describes the current status.  */
 typedef struct _ENTRY
 {
-  int   used;
+  unsigned int used;
   ENTRY entry;
 }
 _ENTRY;
diff --git a/misc/mntent_r.c b/misc/mntent_r.c
index 93955254cd..70da258de6 100644
--- a/misc/mntent_r.c
+++ b/misc/mntent_r.c
@@ -74,16 +74,16 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
       /* skip empty lines and comment lines:  */
     } while (head[0] == '\0' || head[0] == '#');
 
-  mp->mnt_fsname = strsep (&head, " \t") ?: (char *) "";
+  mp->mnt_fsname = __strsep (&head, " \t") ?: (char *) "";
   if (head)
     head += strspn (head, " \t");
-  mp->mnt_dir = strsep (&head, " \t") ?: (char *) "";
+  mp->mnt_dir = __strsep (&head, " \t") ?: (char *) "";
   if (head)
     head += strspn (head, " \t");
-  mp->mnt_type = strsep (&head, " \t") ?: (char *) "";
+  mp->mnt_type = __strsep (&head, " \t") ?: (char *) "";
   if (head)
     head += strspn (head, " \t");
-  mp->mnt_opts = strsep (&head, " \t") ?: (char *) "";
+  mp->mnt_opts = __strsep (&head, " \t") ?: (char *) "";
   switch (head ? sscanf (head, " %d %d ", &mp->mnt_freq, &mp->mnt_passno) : 0)
     {
     case 0: