This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, libstdc++]: Fix configure check for linux/random.h


Hello!

linux/random.h uses __u32 types, which are defined through inclusion
of linux/types.h header. On some older systems (e.g. CentOS 5.11)
linux/random.h doesn't include linux/types.h by itself, and configure
declares found linux/random.h as unusable.

Attached patch fixes detection by including linux/types.h in the
configure check.

2018-01-18  Uros Bizjak  <ubizjak@gmail.com>

    * configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
    include linux/types.h when checking linux/random.h header.
    * config.h.in: Regenerate.
    * configure: Ditto.
    * src/c++11/random.cc: Conditionally include linux/types.h.

Patch was bootstrapped and regression tested on x86_64-linux-gnu
{,-m32} CentOS 5.11 and Fedora 26.

OK for mainline?

Uros.

Attachment: l.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]