testbench: fix portability issues under AIX

This commit is contained in:
Rainer Gerhards 2018-08-31 05:35:01 -05:00
parent 97800407aa
commit 11273d8738
4 changed files with 25 additions and 6 deletions

View File

@ -41,7 +41,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#if defined(_AIX)
#include <unistd.h>
#else
#include <getopt.h>
#endif
int main(int argc, char *argv[])
{

View File

@ -1,5 +1,5 @@
/* generate an input file suitable for use by the testbench
* Copyright (C) 2016 by Pascal Withopf and Adiscon GmbH.
* Copyright (C) 2016-2018 by Pascal Withopf and Adiscon GmbH.
* usage: ./inputfilegen num-lines > file
* Part of rsyslog, licensed under ASL 2.0
*/
@ -7,7 +7,11 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <getopt.h>
#if defined(_AIX)
#include <unistd.h>
#else
#include <getopt.h>
#endif
#define DEFMSGS 5
#define NOEXTRADATA -1

View File

@ -10,7 +10,7 @@
*
* Part of the testbench for rsyslog.
*
* Copyright 2010-2017 Rainer Gerhards and Adiscon GmbH.
* Copyright 2010-2018 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
@ -31,7 +31,11 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#if defined(_AIX)
#include <unistd.h>
#else
#include <getopt.h>
#endif
#include <errno.h>
#include <string.h>
#include <syslog.h>

View File

@ -34,7 +34,14 @@
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <getopt.h>
#if defined(_AIX)
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#else
#include <getopt.h>
#endif
#include <sys/un.h>
#include <netdb.h>
#include <poll.h>