All of lore.kernel.org
 help / color / mirror / Atom feed
From: Natanael Copa <natanael.copa@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: Natanael Copa <ncopa@alpinelinux.org>
Subject: [PATCH v2 09/11] include libgen.h for basename
Date: Wed,  6 Aug 2014 08:25:04 +0200	[thread overview]
Message-ID: <1407306306-29796-10-git-send-email-ncopa@alpinelinux.org> (raw)
In-Reply-To: <1407306306-29796-1-git-send-email-ncopa@alpinelinux.org>

According POSIX basename(3) should have an #include <libgen.h>

There are a different GNU implementation too, that can be used with
_GNU_SOURCE, but the POSIX version is good enough and more portable.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 tools/rpcdebug/rpcdebug.c    | 1 +
 utils/mount/mount.c          | 1 +
 utils/mount/mount_libmount.c | 1 +
 utils/nfsd/nfsd.c            | 1 +
 utils/nfsidmap/nfsidmap.c    | 1 +
 5 files changed, 5 insertions(+)

diff --git a/tools/rpcdebug/rpcdebug.c b/tools/rpcdebug/rpcdebug.c
index d6e10d3..18b1622 100644
--- a/tools/rpcdebug/rpcdebug.c
+++ b/tools/rpcdebug/rpcdebug.c
@@ -26,6 +26,7 @@
 #include <malloc.h>
 #include <fcntl.h>
 #include <ctype.h>
+#include <libgen.h>
 /* RPC debug flags
    #include <sunrpc/debug.h> */
 /* NFS debug flags
diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index eea00af..91f1087 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -33,6 +33,7 @@
 #include <getopt.h>
 #include <mntent.h>
 #include <pwd.h>
+#include <libgen.h>
 
 #include "fstab.h"
 #include "xcommon.h"
diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
index 701d41e..6f85dc9 100644
--- a/utils/mount/mount_libmount.c
+++ b/utils/mount/mount_libmount.c
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <errno.h>
 #include <getopt.h>
+#include <libgen.h>
 
 #include <libmount/libmount.h>
 
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index 03e3c81..201bb13 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <getopt.h>
 #include <netdb.h>
+#include <libgen.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index 3f51b4d..e0d31e7 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <libgen.h>
 
 #include <pwd.h>
 #include <grp.h>
-- 
2.0.4


  parent reply	other threads:[~2014-08-06  6:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  6:24 [PATCH v2 00/11] Porting nfs-utils to musl libc Natanael Copa
2014-08-06  6:24 ` [PATCH v2 01/11] conffile: use standard uint*_t and unsigned char Natanael Copa
2014-08-06  6:24 ` [PATCH v2 02/11] Fix header include for definition of NULL Natanael Copa
2014-08-06  6:24 ` [PATCH v2 03/11] configure.ac: enable GNU_SOURCE for stat64/statfs64 Natanael Copa
2014-08-06  6:24 ` [PATCH v2 04/11] replace __attribute_malloc__ with the more portable __attribute__((__malloc__)) Natanael Copa
2014-08-06  6:25 ` [PATCH v2 05/11] mountd: use standard dev_t instead of glibc internals Natanael Copa
2014-08-06  6:25 ` [PATCH v2 06/11] nfsstat: replace the legacy SA_ONESHOT with standard SA_RESETHAND Natanael Copa
2014-08-06  6:25 ` [PATCH v2 07/11] Allow usage of getrpcbynumber() when getrpcbynumber_r() is unavailable Natanael Copa
2014-08-06  6:25 ` [PATCH v2 08/11] Only work around glibc bugs on glibc Natanael Copa
2014-08-06  6:25 ` Natanael Copa [this message]
2014-08-06  6:25 ` [PATCH v2 10/11] exportfs: fix test of NULL pointer in host_pton() Natanael Copa
2014-08-06  6:25 ` [PATCH v2 11/11] exportfs: only do glibc specific hackery on glibc Natanael Copa
2014-08-12 11:03   ` Steve Dickson
2014-08-13  9:04     ` Natanael Copa
2014-09-16 13:30 ` [PATCH v2 00/11] Porting nfs-utils to musl libc Steve Dickson

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=1407306306-29796-10-git-send-email-ncopa@alpinelinux.org \
    --to=natanael.copa@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=ncopa@alpinelinux.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.