This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] If f(un)lockfile is unavailable define it away
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: <elfutils-devel at sourceware dot org>
- Date: Wed, 3 May 2017 18:32:42 +0200
- Subject: [PATCH] If f(un)lockfile is unavailable define it away
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CMHaCqJs/O+OaiaLOj2H5cRQqZ/J7Lh6ksxQwyi7EPI=; b=kCCGkhuGlLN6baYOf8AvNUrLDpizxPXk0TOCaYiyHDFuf1If3uO9x0OE1zLVSCrWo9hThTidIEJD3uhb2odDWkIodcttYpXpuXUG8lrbz2Apit3HH/GLHDp6vyKM0SuNG/GXL8WSaoyv8FlUFgnCG5dH9b/j612J2vXalaBLi/c=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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