]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: cfgparse: always defined _GNU_SOURCE for sched.h and crypt.h
authorWilly Tarreau <w@1wt.eu>
Sun, 7 Aug 2022 14:55:07 +0000 (16:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Aug 2022 14:55:07 +0000 (16:55 +0200)
commit2e64472d16b00389134ca38b6c81efe5d7be469a
treea5d45557b09d089d4b50c6354c44cf70f33bce17
parentb6189bc268255b799a77fdffcaaa7b221ca2d7a9
BUILD: cfgparse: always defined _GNU_SOURCE for sched.h and crypt.h

_GNU_SOURCE used to be defined only when USE_LIBCRYPT was set. It's also
needed for sched_setaffinity() to be exported. As a side effect, when
USE_LIBCRYPT is not set, a warning is emitted, as Ilya found and reported
in issue #1815. Let's just define _GNU_SOURCE regardless of USE_LIBCRYPT,
and also explicitly add sched.h, as right now it appears to be inherited
from one of the other includes.

This should be backported to 2.4.
src/cfgparse.c