[SERVER-28197] check for pthread_setname_np incorrectly fails Created: 06/Mar/17  Updated: 05/Apr/17  Resolved: 13/Mar/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.5.5

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-03-06, Repl 2017-03-27
Participants:

 Description   

scons: Configure: Checking if pthread_setname_np is supported... 
build/opt/scons/sconf_temp/conftest_49.cpp <-
  |
  |#define _GNU_SOURCE
  |#include <pthread.h>
  |
  |int main() {
  |    pthread_setname_np(pthread_self(), "test");
  |    return 0;
  |}
  |
Compiling build/opt/scons/sconf_temp/conftest_49.o
build/opt/scons/sconf_temp/conftest_49.cpp:2:0: error: "_GNU_SOURCE" redefined [-Werror]
 #define _GNU_SOURCE
 
<command-line>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
scons: Configure: no



 Comments   
Comment by Githook User [ 13/Mar/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28197 Fix pthread_setname_np check

Without this change, I get the following error and it detects that I don't
have pthread_setname_np.

build/opt/scons/sconf_temp/conftest_49.cpp:2:0: error: "_GNU_SOURCE" redefined [-Werror]
#define _GNU_SOURCE

<command-line>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
Branch: master
https://github.com/mongodb/mongo/commit/259fed1b72cf3145948068002bdb2cdb94b40d0d

Generated at Thu Feb 08 04:17:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.