After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660177 - Fix build on systems without gettid(2) system call
Fix build on systems without gettid(2) system call
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
3.2.x
Other OpenBSD
: Normal major
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
: 664545 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-26 21:03 UTC by Jasper Lievisse Adriaanse
Modified: 2012-03-14 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use getpid when gettid is not available. (830 bytes, patch)
2011-09-26 21:03 UTC, Jasper Lievisse Adriaanse
none Details | Review

Description Jasper Lievisse Adriaanse 2011-09-26 21:03:15 UTC
Created attachment 197513 [details] [review]
use getpid when gettid is not available.

gettid() (and SYS_gettid()) don't exist on OpenBSD/FreeBSD and various others. The usage of this syscall breaks the build of GOA on those platforms. The closest thing to it's functionality is getpid(), which I think is OK to use for the usage case of GOA (logging).

OK to push this patch?
Comment 1 David Zeuthen (not reading bugmail) 2011-09-26 21:09:14 UTC
We actually want the thread-id since it's used to distinguish output from different threads. OK to push the patch to master if you add a note saying 

 /* TODO: Need to find a portable way of getting the thread ID (#660177) */

above the #ifdef. Thanks.
Comment 2 Jasper Lievisse Adriaanse 2011-09-26 21:16:38 UTC
Allright, thanks.
Comment 3 Debarshi Ray 2012-03-14 16:21:05 UTC
*** Bug 664545 has been marked as a duplicate of this bug. ***