From 6b071d73cffc66df0bdb9ee3c062143f06923c78 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 3 Jul 2023 14:38:08 -0400 Subject: [PATCH] cleanup: move rand_r compat code to tests This compat code is only used in the tests, move it there as it should probably not be used in the library. Change-Id: I0a36e790c236bb90d07a711af9cc6f8388fa4c81 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- src/Makefile.am | 2 +- tests/common/Makefile.am | 9 +++++---- {src => tests/common}/compat-rand.h | 0 3 files changed, 6 insertions(+), 5 deletions(-) rename {src => tests/common}/compat-rand.h (100%) diff --git a/src/Makefile.am b/src/Makefile.am index ede2669..b555c81 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,7 +9,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/src AM_LDFLAGS=-version-info $(URCU_LIBRARY_VERSION) $(LT_NO_UNDEFINED) dist_noinst_HEADERS = urcu-die.h urcu-wait.h compat-getcpu.h \ - compat-rand.h urcu-utils.h compat-smp.h + urcu-utils.h compat-smp.h COMPAT = compat_arch.c compat_futex.c diff --git a/tests/common/Makefile.am b/tests/common/Makefile.am index 2cdc273..af6d89f 100644 --- a/tests/common/Makefile.am +++ b/tests/common/Makefile.am @@ -2,12 +2,13 @@ # # SPDX-License-Identifier: MIT -AM_CPPFLAGS += -I$(top_srcdir)/src +AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tests/common -noinst_HEADERS = thread-id.h +noinst_HEADERS = \ + api.h \ + compat-rand.h \ + thread-id.h noinst_LTLIBRARIES = libdebug-yield.la libdebug_yield_la_SOURCES = debug-yield.c debug-yield.h - -EXTRA_DIST = api.h diff --git a/src/compat-rand.h b/tests/common/compat-rand.h similarity index 100% rename from src/compat-rand.h rename to tests/common/compat-rand.h -- 2.34.1