xfs
[Top] [All Lists]

[PATCH 2/6] xfsprogs: pull in libgen.h to get prototype for basename()

To: xfs@xxxxxxxxxxx
Subject: [PATCH 2/6] xfsprogs: pull in libgen.h to get prototype for basename()
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Sun, 26 Jul 2015 08:20:51 -0400
Cc: Theodore Ts'o <tytso@xxxxxxx>, fstests@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=1fToWGghHoSKUgu0rfxUnHvxxUXN1QR6QlWGUz12lnc=; b=EY5+GMoO5kWONp3cXqJKE1/9yx+FmCzS0xRc1YXH4W2J9sG4nlRHwQ7iGycXNbK4jGPc4gIZ9fLFu4JfT8m3AjK9xA4U/fFGj1318UxYixPQfYAEnQh85g2OjLNGnVo+YbhLtzvYk4EhHOMws6s52oCS/3HiiJUM+kf432zeaHs=;
In-reply-to: <1437913255-7524-1-git-send-email-tytso@xxxxxxx>
References: <1437913255-7524-1-git-send-email-tytso@xxxxxxx>
The function prototype for basename() is in <libgen.h>, per Posix.
Without the the function prototype, the build will throw errors due to
the missing prototype.

On glibc, using libgen.h will force the use of Poxis's basename(),
instead of glibc's basename() with GNU extensions.  However, xfsprogs
doesn't depend on any of the GNU extensions, so this is fine.

Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
---
 include/platform_defs.h.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 3e059af..bfab7cc 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -35,6 +35,7 @@
 #include <sys/types.h>
 #include <limits.h>
 #include <stdbool.h>
+#include <libgen.h>
 
 #undef HAVE___U32
 #ifdef HAVE___U32
-- 
2.3.0

<Prev in Thread] Current Thread [Next in Thread>