[Bugs] [Bug 1792539] New: Missing autoconf check for non-portable mutex types

bugzilla at redhat.com bugzilla at redhat.com
Fri Jan 17 21:32:17 UTC 2020


https://bugzilla.redhat.com/show_bug.cgi?id=1792539

            Bug ID: 1792539
           Summary: Missing autoconf check for non-portable mutex types
           Product: GlusterFS
           Version: 7
            Status: NEW
         Component: porting
          Assignee: bugs at gluster.org
          Reporter: json.high at gmail.com
                CC: bugs at gluster.org
  Target Milestone: ---
    Classification: Community



Description of problem:

Fails to compile due to non-portable mutex types in rpcsvc.c.  Could we please
add a autoconf check for non-portable mutex types?

Version-Release number of selected component (if applicable):
7.1

How reproducible:
Easy

Steps to Reproduce:
1.Try to compile on system without PTHREAD_MUTEX_ADAPTIVE_NP mutex type
2.
3.

Actual results:
Fails to compile - unknown type PTHREAD_MUTEX_ADAPTIVE_NP type in rpcsvc.c

Expected results:
Check for non-portable types

Additional info:

Check should be easy.  Something like

AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
]], [[
  return (PTHREAD_MUTEX_ADAPTIVE_NP);
]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
          [Define to 1 if system has the `PTHREAD_MUTEX_ADAPTIVE_NP'.])
], [
AC_MSG_RESULT([no])
])

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list