From 123ce865ead4baf0654bb9a870170dcf44d509f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Tue, 26 Apr 2022 16:06:00 +0200 Subject: [PATCH] vxi11/osiRpc.h: Only RTEMS with RTEMS_LEGACY_STACK needs rpcTaskInit Reported by Michael Davidsaver: With RTEMS 5 for pc686 with the libbsd (aka. "new") network stack I get: In file included from ../../asyn/vxi11/drvVxi11.c:41:0: ../../asyn/vxi11/drvVxi11.c: In function 'vxiConnectPort': ../../asyn/vxi11/osiRpc.h:25:21: error: implicit declaration of function 'rtems_rpc_task_init'; did you mean 'rtems_task_exit'? [-Werror=implicit-function-declaration] #define rpcTaskInit rtems_rpc_task_init ^ ../../asyn/vxi11/drvVxi11.c:908:12: note: in expansion of macro 'rpcTaskInit' if(rpcTaskInit() == -1) { ================ Solution: Use RTEMS_LEGACY_STACK to switch between the "old" and "new" networkstack for RTEMS --- asyn/vxi11/osiRpc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/asyn/vxi11/osiRpc.h b/asyn/vxi11/osiRpc.h index dbf3d616c..e0589fc1e 100644 --- a/asyn/vxi11/osiRpc.h +++ b/asyn/vxi11/osiRpc.h @@ -22,7 +22,10 @@ #ifdef __rtems__ #include #include +#ifdef RTEMS_LEGACY_STACK #define rpcTaskInit rtems_rpc_task_init +#else +#define rpcTaskInit() 0 #endif #ifdef __APPLE__