Bug #83994 MySQL Server: Variable length array in XCom causing build error
| Submitted: | 28 Nov 2016 16:36 | Modified: | 31 Mar 2017 19:46 |
|---|---|---|---|
| Reporter: | Filipe Campos | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Group Replication | Severity: | S3 (Non-critical) |
| Version: | 5.7.17 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[31 Mar 2017 19:46]
Daniel Price
Posted by developer: Fixed as of the upcoming 5.7.18, 8.0.1 release, and here's the changelog entry: Compiling MySQL 5.7.17 failed with a variable length array error.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.064 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: With the -Wlva option enabled, the compilation of MySQL Server 5.7.17 fails with the following error: .../rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/sock_probe.c:73:2: error: ISO C90 forbids variable length array 'name' [-Werror=vla] char name[MAXHOSTNAMELEN+1]; ^~~~ This error is generated by the following code which defines MAXHOSTNAMELEN as a call to sysconf(_SC_HOST_NAME_MAX) when _SC_HOST_NAME_MAX is defined. /* Required for FreeBSD, NetBSD and MacOS */ #ifndef MAXHOSTNAMELEN #ifdef _SC_HOST_NAME_MAX #define MAXHOSTNAMELEN sysconf(_SC_HOST_NAME_MAX) #else #define MAXHOSTNAMELEN 1024 #endif #endif How to repeat: -Compile MySQL Server 5.7.17. Suggested fix: -Port the patch that already exists in the original product and fixes this issue to mysql-5.7.