[lttng-dev] [PATCH lttng-tools 1/2] Fix: build failure when __GLIBC_PREREQ is missing
Jérémie Galarneau
jeremie.galarneau at efficios.com
Fri Mar 18 13:58:40 UTC 2016
No, the patches look fine to me. It was mostly a matter of me needing
to read up on musl-libc.
I'm planning to merge both patches later today.
Cheers,
Jérémie
On Fri, Mar 18, 2016 at 1:28 AM, Baruch Siach <baruch at tkos.co.il> wrote:
> Hi Jérémie,
>
> On Tue, Mar 08, 2016 at 02:55:04PM +0200, Baruch Siach wrote:
>> The musl C library does not provide the __GLIBC_PREREQ macro. Instead of
>> relying on glibc version test, check directly for the availability of
>> epoll_create1().
>>
>> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
>
> Would you consider applying these patches to upstream lttng-tools tree? Is
> there anything I need to change for this?
>
> Thanks,
> baruch
>
>> ---
>> configure.ac | 2 +-
>> src/common/compat/poll.h | 4 ++--
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 693c456a620d..fdbce41c2428 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -120,7 +120,7 @@ AC_CHECK_FUNCS([ \
>> gethostbyname gethostname getpagesize localtime_r memchr memset \
>> mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \
>> strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \
>> - strtoull dirfd gethostbyname2 getipnodebyname \
>> + strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \
>> ])
>>
>> # Babeltrace viewer check
>> diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h
>> index 5f45da2b3b04..34d0cffda479 100644
>> --- a/src/common/compat/poll.h
>> +++ b/src/common/compat/poll.h
>> @@ -73,7 +73,7 @@ enum {
>> LPOLLNVAL = EPOLLHUP,
>> LPOLLRDHUP = EPOLLRDHUP,
>> /* Close on exec feature of epoll */
>> -#if __GLIBC_PREREQ(2, 9)
>> +#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC)
>> LTTNG_CLOEXEC = EPOLL_CLOEXEC,
>> #else
>> /*
>> @@ -127,7 +127,7 @@ extern int compat_epoll_create(struct lttng_poll_event *events,
>> #define lttng_poll_create(events, size, flags) \
>> compat_epoll_create(events, size, flags)
>>
>> -#if __GLIBC_PREREQ(2, 9)
>> +#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC)
>> static inline int compat_glibc_epoll_create(int size __attribute__((unused)),
>> int flags)
>> {
>> --
>> 2.7.0
>>
>
> --
> http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list