Bug #88902 Warning: _GNU_SOURCE redefined
Submitted: 13 Dec 2017 14:56 Modified: 14 Dec 2017 14:08
Reporter: Norvald Ryeng Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.4 OS:Any
Assigned to: CPU Architecture:Any

[13 Dec 2017 14:56] Norvald Ryeng
Description:
When building MySQL with GCC on Linux, there is only one warning:

~/mysql/trunk/bld/mysql-test$ ninja -C ..
ninja: Entering directory `..'
[61/3032] Building C object extra/libevent/CMakeFiles/event.dir/buffer.c.o
../extra/libevent/buffer.c:39:0: warning: "_GNU_SOURCE" redefined
 #define _GNU_SOURCE
 
<command-line>:0:0: note: this is the location of the previous definition

How to repeat:
Build MySQL.

Suggested fix:
Don't redefine _GNU_SOURCE in extra/libevent/buffer.c.

This seems to already have been fixed upstream: https://github.com/libevent/libevent/blob/master/evconfig-private.h.in#L11
[14 Dec 2017 14:08] Paul DuBois
Posted by developer:
 
Fixed in 8.0.5, 9.0.0.

Code cleanup. No changelog entry needed.