Change include order in unittest files

The tests are compiled without -D_GNU_SOURCE, therefore
the XSI version of strerror_r is used. Defining
_GNU_SOURCE in torture.h then including *.c gives error
because it is assuming GNU version of strerror_r in
the source file.

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Norbert Pocs
2022-06-30 16:43:35 +02:00
committed by Jakub Jelen
parent 2abd4bfb6c
commit b6a4330fe4
10 changed files with 10 additions and 10 deletions

View File

@@ -4,10 +4,10 @@
#define LIBSSH_STATIC
#include <libssh/priv.h>
#include "torture.h"
#include "knownhosts.c"
#include "torture.h"
#if (defined _WIN32) || (defined _WIN64)
#ifndef S_IRWXO
#define S_IRWXO 0

View File

@@ -13,8 +13,8 @@
#define LIBSSH_STATIC
#include <libssh/priv.h>
#include "torture.h"
#include "misc.c"
#include "torture.h"
#include "error.c"
#define TORTURE_TEST_DIR "/usr/local/bin/truc/much/.."

View File

@@ -5,10 +5,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_pki.h"
#include "torture_key.h"
#include "pki.c"
const unsigned char INPUT[] = "1234567890123456789012345678901234567890"
"123456789012345678901234";

View File

@@ -6,10 +6,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_key.h"
#include "torture_pki.h"
#include "pki.c"
#define LIBSSH_DSA_TESTKEY "libssh_testkey.id_dsa"
#define LIBSSH_DSA_TESTKEY_PASSPHRASE "libssh_testkey_passphrase.id_dsa"

View File

@@ -5,10 +5,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_key.h"
#include "torture_pki.h"
#include "pki.c"
#define LIBSSH_ECDSA_TESTKEY "libssh_testkey.id_ecdsa"
#define LIBSSH_ECDSA_TESTKEY_PASSPHRASE "libssh_testkey_passphrase.id_ecdsa"

View File

@@ -6,10 +6,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_pki.h"
#include "torture_key.h"
#include "pki.c"
#define LIBSSH_ECDSA_TESTKEY "libssh_testkey.id_"
#define LIBSSH_ECDSA_TESTKEY_PEM "libssh_testkey_pem.id_"

View File

@@ -2,10 +2,10 @@
#define LIBSSH_STATIC
#include "pki.c"
#include "torture.h"
#include "torture_key.h"
#include "torture_pki.h"
#include "pki.c"
#include <sys/stat.h>
#include <fcntl.h>

View File

@@ -6,10 +6,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_pki.h"
#include "torture_key.h"
#include "pki.c"
#define LIBSSH_RSA_TESTKEY "libssh_testkey.id_rsa"
#define LIBSSH_RSA_TESTKEY_PASSPHRASE "libssh_testkey_passphrase.id_rsa"

View File

@@ -6,10 +6,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_pki.h"
#include "torture_key.h"
#include "pki.c"
#define LIBSSH_RSA_TESTKEY "libssh_testkey.id_rsa"
#define LIBSSH_RSA_TESTKEY_PASSPHRASE "libssh_testkey_passphrase.id_rsa"

View File

@@ -26,10 +26,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "pki.c"
#include "torture.h"
#include "torture_pki.h"
#include "torture_key.h"
#include "pki.c"
#include <pthread.h>