2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

tests: Fix order of includes in barrier/id-fpool/mpsc-queue tests.

config.h must be included first, because it affects all the later
included headers, even the system ones.  Also, struct timeval
requires inclusion of sys/time.h.

This fixes the build with CC=clang CFLAGS='-std=c99 -fgnuc-version=0'

Fixes: aec1081c7df3 ("tests: Add ovs-barrier unit test.")
Fixes: 2eac33c6cc4a ("id-fpool: Module for fast ID generation.")
Fixes: 5396ba5b21c4 ("mpsc-queue: Module for lock-free message passing.")
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Ilya Maximets 2023-08-22 12:35:40 +02:00
parent 1776aa17a9
commit f0899b1fcb
3 changed files with 8 additions and 8 deletions

View File

@ -14,13 +14,13 @@
* limitations under the License.
*/
#include <config.h>
#undef NDEBUG
#include <getopt.h>
#include <config.h>
#include "ovs-thread.h"
#include "ovs-rcu.h"
#include "ovstest.h"
#include "ovs-rcu.h"
#include "ovs-thread.h"
#include "random.h"
#include "util.h"

View File

@ -14,12 +14,12 @@
* limitations under the License.
*/
#include <config.h>
#undef NDEBUG
#include <assert.h>
#include <getopt.h>
#include <string.h>
#include <config.h>
#include <sys/time.h>
#include "command-line.h"
#include "id-fpool.h"

View File

@ -14,12 +14,12 @@
* limitations under the License.
*/
#include <config.h>
#undef NDEBUG
#include <assert.h>
#include <getopt.h>
#include <string.h>
#include <config.h>
#include <sys/time.h>
#include "command-line.h"
#include "guarded-list.h"