[
https://issues.apache.org/jira/browse/THRIFT-3512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15074124#comment-15074124
]
ASF GitHub Bot commented on THRIFT-3512:
----------------------------------------
GitHub user simonsouth opened a pull request:
https://github.com/apache/thrift/pull/763
Thrift 3512 c glib build fails due to missing features.h
Include `features.h` (in `testbinaryprotocol.c`) only only platforms that
use GNU libc.
This fixes THRIFT-3512 and assumes the fix for THRIFT-3498 has been
committed.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/simonsouth/thrift
thrift-3512-c_glib-build-fails-due-to-missing-features.h
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/763.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #763
----
commit 5fbe84f68871009aaa8adf55579b048c164dd403
Author: Simon South <[email protected]>
Date: 2015-12-21T19:01:36Z
THRIFT-3498 C++ library assumes optional function
pthread_attr_setschedpolicy is available
PosixThreadFactory.cpp: Test for availability of optional
pthread_attr_setschedpolicy function before including in source code
commit 51bf5d83765d7bbea475cf8b6389f3a345d8a572
Author: Simon South <[email protected]>
Date: 2015-12-29T17:02:18Z
THRIFT-3512 c_glib: Build fails due to missing features.h
testbinaryprotocol.c: Include features.h only on platforms with GNU
libc.
----
> c_glib: Build fails due to missing features.h
> ---------------------------------------------
>
> Key: THRIFT-3512
> URL: https://issues.apache.org/jira/browse/THRIFT-3512
> Project: Thrift
> Issue Type: Bug
> Components: C glib - Library
> Affects Versions: 0.9.4
> Environment: gcc 4.8.5 on Haiku hrev49940 (x86)
> Reporter: Simon South
> Assignee: Simon South
> Priority: Minor
> Labels: c_glib, library, test-suite
>
> Building the C (GLib) library test suite on Haiku fails with an error about a
> missing {{features.h}}:
> {noformat}
> testbinaryprotocol.c:25:22: fatal error: features.h: No such file or directory
> #include <features.h>
> ^
> {noformat}
> This header appears to be part of GNU libc and is not defined by POSIX, which
> explains why it would not be available on Haiku. The same applies to the
> BSDs, for which I notice a preprocessor directive was added that explicitly
> checks for these platforms.
> A better solution is probably to omit including the header whenever GNU libc
> is not being used, rather than listing every platform on which it is not
> available.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)