gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-fuse] branch master updated: Compiling gnunet-fuse fails on Arch


From: gnunet
Subject: [gnunet-fuse] branch master updated: Compiling gnunet-fuse fails on Arch due to
Date: Tue, 01 Mar 2022 12:52:53 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet-fuse.

The following commit(s) were added to refs/heads/master by this push:
     new 5e3ae1e  Compiling gnunet-fuse fails on Arch due to
5e3ae1e is described below

commit 5e3ae1e8d8b6bf440b36ea2a6f553d4d365a8110
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Mar 1 12:52:05 2022 +0100

    Compiling gnunet-fuse fails on Arch due to
    
    undefined reference to `pthread_mutexattr_setkind_np'
    
    In the file that provokes the error there is this comment:
    
        This prototype is somehow missing in various Linux pthread include 
files. But we need it and it seems to be available on all pthread-systems so 
far. Odd.
    
    The reason is that pthread_mutexattr_setkind_np() is deprecated and 
non-standard. The standard version is called pthread_mutexattr_settype().
---
 src/fuse/mutex.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/src/fuse/mutex.c b/src/fuse/mutex.c
index beb6f93..f035ec8 100644
--- a/src/fuse/mutex.c
+++ b/src/fuse/mutex.c
@@ -35,16 +35,6 @@
 #endif
 #endif
 
-/**
- * This prototype is somehow missing in various Linux pthread
- * include files. But we need it and it seems to be available
- * on all pthread-systems so far. Odd.
- */
-#ifndef _MSC_VER
-extern int pthread_mutexattr_setkind_np (pthread_mutexattr_t * attr,
-                                         int kind);
-#endif
-
 
 /**
  * @brief Structure for MUTual EXclusion (Mutex).
@@ -67,23 +57,13 @@ GNUNET_mutex_create (int isRecursive)
   pthread_mutexattr_init (&attr);
   if (isRecursive)
     {
-#ifdef __linux__
-      GNUNET_assert (0 == pthread_mutexattr_setkind_np
-                    (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
-#elif BSD || SOLARIS || OSX || WINDOWS
       GNUNET_assert (0 == pthread_mutexattr_settype
                     (&attr, PTHREAD_MUTEX_RECURSIVE));
-#endif
     }
   else
     {
-#ifdef __linux__
-      GNUNET_assert (0 == pthread_mutexattr_setkind_np
-                    (&attr, PTHREAD_MUTEX_ERRORCHECK_NP));
-#else
       GNUNET_assert (0 == pthread_mutexattr_settype
                     (&attr, PTHREAD_MUTEX_ERRORCHECK));
-#endif
     }
   mut = GNUNET_new (struct GNUNET_Mutex);
   GNUNET_assert (0 == pthread_mutex_init (&mut->pt, &attr));

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]