Bug 1792539 - Missing autoconf check for non-portable mutex types
Summary: Missing autoconf check for non-portable mutex types
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: mainline
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-17 21:32 UTC by Jason High
Modified: 2020-03-12 14:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-12 14:49:57 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 24135 0 None Abandoned check for non-portable mutex type 2020-05-20 19:30:31 UTC

Description Jason High 2020-01-17 21:32:17 UTC
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])
])

Comment 1 hari gowtham 2020-02-12 06:51:01 UTC
Hi Jason,

As you already know the solution, can you send out the fix as a patch so we can review and take it up?
I'm assigning this bug to you. If you couldn't look into it, feel free to take out your name from the assignee.

Regards,
Hari.

Comment 2 Jason High 2020-02-19 08:52:55 UTC
patch submitted via gerrit

Comment 3 Worker Ant 2020-02-19 11:25:53 UTC
REVIEW: https://review.gluster.org/24135 (check for non-portable mutex type) posted (#4) for review on master by None

Comment 4 Jason High 2020-02-19 13:58:09 UTC
working/tested patch tested on debian and NetBSD.  Added bz#, change-id, and updated version in hopes of clearing up some of the automated jenkins test issues

Comment 5 Worker Ant 2020-03-12 14:49:57 UTC
This bug is moved to https://github.com/gluster/glusterfs/issues/1074, and will be tracked there from now on. Visit GitHub issues URL for further details


Note You need to log in before you can comment on or make changes to this bug.