The branch, master has been updated
       via  83ff87f3dab ctdb: fix build against PCP 7.0.0
      from  d55265beb8e third_party:heimdal: import 
lorikeet-heimdal-202508180154

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 83ff87f3dab0d6b22031614e9481b880f1dd99e8
Author: Alexander Bokovoy <[email protected]>
Date:   Wed Sep 3 15:42:46 2025 +0300

    ctdb: fix build against PCP 7.0.0
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15904
    
    Signed-off-by: Alexander Bokovoy <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    
    Autobuild-User(master): Martin Schwenke <[email protected]>
    Autobuild-Date(master): Mon Sep  8 04:47:37 UTC 2025 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 ctdb/utils/pmda/pmda_ctdb.c | 11 ++++++++++-
 ctdb/wscript                | 21 +++++++++++----------
 2 files changed, 21 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/utils/pmda/pmda_ctdb.c b/ctdb/utils/pmda/pmda_ctdb.c
index 7ac8a3b38d1..9845f26defb 100644
--- a/ctdb/utils/pmda/pmda_ctdb.c
+++ b/ctdb/utils/pmda/pmda_ctdb.c
@@ -39,10 +39,19 @@
 
 #define pmID_cluster(id)       id->cluster
 #define pmID_item(id)          id->item
+#endif
+
+#ifndef HAVE_PMGETPROGNAME
 #define pmGetProgname()                pmProgname
+#endif
+#ifndef HAVE_PMSETPROGNAME
 #define pmSetProgname(a)       __pmSetProgname(a)
 #endif
 
+#ifdef HAVE_STRUCT_PMRESULT
+#define pmdaResult pmResult
+#endif
+
 #include "domain.h"
 
 /*
@@ -450,7 +459,7 @@ err_out:
  * instance domain evaluation.
  */
 static int
-pmda_ctdb_fetch(int numpmid, pmID pmidlist[], pmResult **resp, pmdaExt *pmda)
+pmda_ctdb_fetch(int numpmid, pmID pmidlist[], pmdaResult **resp, pmdaExt *pmda)
 {
        int ret;
 
diff --git a/ctdb/wscript b/ctdb/wscript
index e9cd89436a3..6ab68dce870 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -226,16 +226,17 @@ def configure(conf):
 
     have_pmda = False
     if Options.options.ctdb_pmda:
-        pmda_support = True
-
-        if not conf.CHECK_HEADERS('pcp/pmapi.h pcp/impl.h pcp/pmda.h',
-                                  together=True):
-            pmda_support = False
-        if not conf.CHECK_FUNCS_IN('pmProgname', 'pcp'):
-            pmda_support = False
-        if not conf.CHECK_FUNCS_IN('pmdaDaemon', 'pcp_pmda'):
-            pmda_support = False
-        if pmda_support:
+        checks = [conf.CHECK_HEADERS('pcp/pmapi.h pcp/impl.h pcp/pmda.h',
+                                     together=True),
+                  conf.CHECK_FUNCS_IN('pmdaDaemon', 'pcp_pmda')]
+
+        have_progname = [conf.CHECK_FUNCS_IN('pmProgname', 'pcp'),
+                         conf.CHECK_FUNCS_IN('pmGetProgname', 'pcp'),
+                         conf.CHECK_FUNCS_IN('pmSetProgname', 'pcp')]
+
+        conf.CHECK_TYPE_IN('struct pmResult', 'pcp/pmapi.h')
+
+        if all(checks) and any(have_progname):
             conf.CHECK_TYPE_IN('__pmID_int', 'pcp/pmapi.h pcp/impl.h')
             have_pmda = True
         else:


-- 
Samba Shared Repository

Reply via email to