From 4598b365dd636446f702280e3d36a503ee6cfe6d Mon Sep 17 00:00:00 2001
From: "benjamin.franksen" <benjamin.franksen@helmholtz-berlin.de>
Date: Thu, 15 Aug 2013 12:14:17 +0000
Subject: [PATCH] fix: split off subThreadSleep to its own C file

This fixes a build error with older base releases.
---
 test/validate/Makefile         |  1 +
 test/validate/subThreadSleep.c | 18 ++++++++++++++++++
 test/validate/testSupport.c    | 12 ------------
 3 files changed, 19 insertions(+), 12 deletions(-)
 create mode 100644 test/validate/subThreadSleep.c

diff --git a/test/validate/Makefile b/test/validate/Makefile
index e83c35c6..7e9c7b46 100644
--- a/test/validate/Makefile
+++ b/test/validate/Makefile
@@ -76,6 +76,7 @@ DBD += seqSoftIoc.dbd
 seqSoftIoc_DBD += base.dbd
 seqSoftIoc_DBD += testSupport.dbd
 
+seqSoftIoc_SRCS += subThreadSleep.c
 seqSoftIoc_SRCS += seqSoftIoc_registerRecordDeviceDriver.cpp
 
 ifeq '$(EPICS_HAS_UNIT_TEST)' '1'
diff --git a/test/validate/subThreadSleep.c b/test/validate/subThreadSleep.c
new file mode 100644
index 00000000..79cbca64
--- /dev/null
+++ b/test/validate/subThreadSleep.c
@@ -0,0 +1,18 @@
+/*************************************************************************\
+Copyright (c) 2010-2012 Helmholtz-Zentrum Berlin f. Materialien
+                        und Energie GmbH, Germany (HZB)
+This file is distributed subject to a Software License Agreement found
+in the file LICENSE that is included with this distribution.
+\*************************************************************************/
+#include "epicsThread.h"
+#include "subRecord.h"
+#include "registryFunction.h"
+#include "epicsExport.h"
+
+long subThreadSleep(struct subRecord *psub)
+{
+    epicsThreadSleep(1);
+    psub->val += 1.0;
+    return 0;
+}
+epicsRegisterFunction(subThreadSleep);
diff --git a/test/validate/testSupport.c b/test/validate/testSupport.c
index 53f0e4e6..7598c1ae 100644
--- a/test/validate/testSupport.c
+++ b/test/validate/testSupport.c
@@ -60,15 +60,3 @@ void seq_test_done(void)
     epicsAtThreadExit(seq_test_at_thread_exit, 0);
 #endif
 }
-
-#include "subRecord.h"
-#include "registryFunction.h"
-#include "epicsExport.h"
-
-long subThreadSleep(struct subRecord *psub)
-{
-    epicsThreadSleep(1);
-    psub->val += 1.0;
-    return 0;
-}
-epicsRegisterFunction(subThreadSleep);
-- 
GitLab