public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] If f(un)lockfile is unavailable define it away
@ 2017-05-04  8:16 Ulf Hermann
  0 siblings, 0 replies; only message in thread
From: Ulf Hermann @ 2017-05-04  8:16 UTC (permalink / raw)
  To: elfutils-devel

Sometimes _POSIX_THREAD_SAFE_FUNCTIONS is still set in this case, which
in turn leads to build problems in getopt.c (which would define the
functions to nop anyway if it knew they aren't present).

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
 lib/ChangeLog   | 5 +++++
 lib/eu-config.h | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/lib/ChangeLog b/lib/ChangeLog
index ecc6179..58ee43f 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-03  Ulf Hermann  <ulf.hermann@qt.io>
+
+	* eu-config.h: Define flockfile and funlockfile away if gnulib hasn't
+	detected them.
+
 2017-04-27  Ulf Hermann  <ulf.hermann@qt.io>
 
 	* eu-config.h: Define attribute_hidden to be empty if the compiler
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 135803e..e69b213 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -198,5 +198,12 @@ asm (".section predict_data, \"aw\"; .previous\n"
 # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
 #endif
 
+#if !HAVE_FLOCKFILE
+# define flockfile(fp) /* nop */
+#endif
+
+#if !HAVE_FUNLOCKFILE
+# define funlockfile(fp) /* nop */
+#endif
 
 #endif	/* eu-config.h */
-- 
2.1.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-03 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04  8:16 [PATCH] If f(un)lockfile is unavailable define it away Ulf Hermann

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 read-only IMAP folder(s) and NNTP newsgroup(s).