Bug 111264 - u_thread.h:64:39: error: too many arguments to function call, expected 1, have 2
Summary: u_thread.h:64:39: error: too many arguments to function call, expected 1, have 2
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Matt Turner
QA Contact: mesa-dev
URL: https://gitlab.freedesktop.org/mesa/m...
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-07-31 02:55 UTC by Vinson Lee
Modified: 2019-08-02 18:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2019-07-31 02:55:35 UTC
In file included from src/gallium/auxiliary/os/os_thread.h:42:
src/util/u_thread.h:64:39: error: too many arguments to function call, expected 1, have 2
   pthread_setname_np(pthread_self(), name);
   ~~~~~~~~~~~~~~~~~~                 ^~~~


9c411e020d164563fb6fcd92a28a435277bf0745 is the first bad commit
commit 9c411e020d164563fb6fcd92a28a435277bf0745
Author: Matt Turner <mattst88@gmail.com>
Date:   Wed Jul 24 18:26:49 2019 -0700

    util: Drop preprocessor guards for glibc-2.12
    
    glibc-2.12 was released in 2010. No one is building new Mesa against 9
    year old glibc, and removing these checks allows the code to work on
    other C libraries like musl.
    
    Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Comment 1 Ian Romanick 2019-07-31 15:58:56 UTC
Looking at the man page (http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html), pthread_setname_np definitely takes two parameters.  Dare I even ask what pthreads library this is?
Comment 2 Vinson Lee 2019-07-31 17:04:49 UTC
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/pthread.h
   512  __API_AVAILABLE(macos(10.6), ios(3.2))
   513  int     pthread_setname_np(const char*);
Comment 3 Matt Turner 2019-07-31 17:43:00 UTC
Aggravatingly, Mac OS's version takes only one parameter it seems. See https://gitlab.haskell.org/ghc/ghc/issues/9684 for example of other projects running into this.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.