epics-modules / autosave

APS BCDA synApps module: autosave
https://epics-modules.github.io/autosave/
Other
8 stars 31 forks source link

Build issue on RTEMS #45

Closed anjohnson closed 1 year ago

anjohnson commented 2 years ago

The nfsMount() convenience routine was deleted from RTEMS 4.10 but EPICS releases now provide it instead. The following patch is needed to compile autosave for RTEMS 4.10 and later targets (only tested with RTEMS-uC5282 against 4.10.2):

diff --git a/asApp/src/os/RTEMS/osdNfs.h b/asApp/src/os/RTEMS/osdNfs.h
index fa5be8e..ff56214 100644
--- a/asApp/src/os/RTEMS/osdNfs.h
+++ b/asApp/src/os/RTEMS/osdNfs.h
@@ -29,6 +29,13 @@
 #define NFS_INVALID_PATH     2           /* path on the NFS server is invalid */
 #define NFS_INVALID_MNTPOINT 3           /* mount point in invalid */

+#if __RTEMS_MAJOR__>4 || \
+    (__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9) || \
+    (__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==9 && __RTEMS_REVISION__==99)
+/* Dropped from librtemsNfs.h in RTEMS 4.10, now defined in EPICS */
+int nfsMount(char *uidhost, char *path, char *mntpoint);
+#endif
+
 /* routines for NFS operation */
 int mountFileSystem(char *uidhost, char *addr, char *path, char *mntpoint);   /* mount the NFS */
 int dismountFileSystem(char *mntpoint);                           /* dismount the NFS */