1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-11-13 01:20:59 +02:00

Compiling as C89

This commit is contained in:
xHire 2017-10-28 08:45:51 +02:00
parent 24c3cdcf6f
commit 60efcc2c9c
4 changed files with 8 additions and 2 deletions

View File

@ -26,10 +26,10 @@ AC_ARG_ENABLE([debug],
[debug=no])
if test "x$debug" = "xyes"; then
AS_COMPILER_FLAGS(AM_CFLAGS, "-g -ggdb -O0 -pipe -pedantic -Wall -Wextra -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Winit-self -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -Wwrite-strings")
AS_COMPILER_FLAGS(AM_CFLAGS, "-std=c89 -g -ggdb -O0 -pipe -pedantic -Wall -Wextra -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Winit-self -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -Wwrite-strings")
AC_DEFINE([DEBUG], [], [Turn on debug mode])
else
AS_COMPILER_FLAGS(AM_CFLAGS, "-O2")
AS_COMPILER_FLAGS(AM_CFLAGS, "-O2 -pipe")
fi

View File

@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _POSIX_C_SOURCE 201112L
#include <arpa/inet.h> /* inet_pton */
#include <ifaddrs.h> /* struct ifaddrs, getifaddrs, freeifaddrs */
#include <netdb.h> /* getnameinfo, NI_NUMERICHOST */

View File

@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#include <net/if.h> /* struct ifreq */
#include <netinet/if_ether.h> /* {P,A}F_PACKET, ETH_P_*, socket, SOCK_RAW,
* setsockopt, SOL_SOCKET, SO_BINDTODEVICE,

View File

@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#include <arpa/inet.h> /* inet_pton */
#include <linux/ethtool.h> /* struct ethtool_value */
#include <linux/if_ether.h> /* ETH_P_ALL */