summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-08-01 21:28:47 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-08-01 21:33:12 +0200
commit6b52d3e3a4e625d64278a58f193c6353c67f7c95 (patch)
tree49ebeaaa2958a5b37b52cbc8d7d1936444a3f3b2
parentca3d36201329f0e21b995d831ce9f6f03b6b985e (diff)
libfshelp: Fix extern inline usage
C99 extern inline semantic is different from GNU semantic, so we cannot blindly write "extern inline". * libfshelp/rlock.h (FSHELP_EXTERN_INLINE): Define to __extern_inline if not already. (rlock_list_init): Mark FSHELP_EXTERN_INLINE instead of extern inline. * libfshelp/fshelp.h (FSHELP_EXTERN_INLINE): Define to __extern_inline instead of extern inline. * libfshelp/extern-inline.c: Include "rlock.h"
-rw-r--r--libfshelp/extern-inline.c1
-rw-r--r--libfshelp/fshelp.h2
-rw-r--r--libfshelp/rlock.h6
3 files changed, 7 insertions, 2 deletions
diff --git a/libfshelp/extern-inline.c b/libfshelp/extern-inline.c
index 44424937..2572ab2e 100644
--- a/libfshelp/extern-inline.c
+++ b/libfshelp/extern-inline.c
@@ -21,4 +21,5 @@
#define FSHELP_EXTERN_INLINE
#include "fshelp.h"
+#include "rlock.h"
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index 62be94ab..40d65b39 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -19,7 +19,7 @@
#define _HURD_FSHELP_
#ifndef FSHELP_EXTERN_INLINE
-#define FSHELP_EXTERN_INLINE extern inline
+#define FSHELP_EXTERN_INLINE __extern_inline
#endif
/* This library implements various things that are generic to
diff --git a/libfshelp/rlock.h b/libfshelp/rlock.h
index 5c620279..e1b7b257 100644
--- a/libfshelp/rlock.h
+++ b/libfshelp/rlock.h
@@ -21,6 +21,10 @@
#ifndef FSHELP_RLOCK_H
#define FSHELP_RLOCK_H
+#ifndef FSHELP_EXTERN_INLINE
+#define FSHELP_EXTERN_INLINE __extern_inline
+#endif
+
#include <pthread.h>
#include <string.h>
@@ -45,7 +49,7 @@ struct rlock_list
void *po_id;
};
-extern inline error_t
+FSHELP_EXTERN_INLINE error_t
rlock_list_init (struct rlock_peropen *po, struct rlock_list *l)
{
memset (l, 0, sizeof (struct rlock_list));