[PATCH] ctdb/tests: add missing dependency to libreplace for PTHREAD_MUTEX_ROBUST

Björn Baumbach bb at sernet.de
Thu Feb 7 11:10:02 UTC 2019


Hi!

The attached path solves a build issue in the ctdb tests:
[2694/3871] Compiling ctdb/tests/src/test_mutex_raw.c
../ctdb/tests/src/test_mutex_raw.c: In function ‘main’:
../ctdb/tests/src/test_mutex_raw.c:332: error: ‘PTHREAD_MUTEX_ROBUST’
undeclared (first use in this function)

Please review :-)

Best regards,
Björn

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de
-------------- next part --------------
From 6e9b6316a2d9087a4294e64662aaf08d5f827d4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb at sernet.de>
Date: Wed, 6 Feb 2019 10:45:15 +0100
Subject: [PATCH] ctdb/tests: add missing dependency to libreplace for
 PTHREAD_MUTEX_ROBUST
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

solves:
[2694/3871] Compiling ctdb/tests/src/test_mutex_raw.c
../ctdb/tests/src/test_mutex_raw.c: In function ‘main’:
../ctdb/tests/src/test_mutex_raw.c:332: error: ‘PTHREAD_MUTEX_ROBUST’ undeclared (first use in this function)

Signed-off-by: Björn Baumbach <bb at sernet.de>
---
 ctdb/tests/src/test_mutex_raw.c | 2 ++
 ctdb/wscript                    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c
index 926a5251b7a..5ad3c216818 100644
--- a/ctdb/tests/src/test_mutex_raw.c
+++ b/ctdb/tests/src/test_mutex_raw.c
@@ -62,6 +62,8 @@
  * the value was cleared by the kernel and now no process holds the mutex.
  */
 
+#include "replace.h"
+#include "system/threads.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
diff --git a/ctdb/wscript b/ctdb/wscript
index 30b09d6dc16..d456926002f 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -1046,7 +1046,7 @@ def build(bld):
     if bld.env.HAVE_ROBUST_MUTEXES and sys.platform.startswith('linux'):
         bld.SAMBA_BINARY('test_mutex_raw',
                          source='tests/src/test_mutex_raw.c',
-                         deps='pthread',
+                         deps='replace',
                          install_path='${CTDB_TEST_LIBEXECDIR}')
 
     test_subdirs = [
-- 
2.19.2



More information about the samba-technical mailing list