Browse Source

fcntl.h: declare f_owner_ex for all architectures

Waldemar Brodkorb 8 months ago
parent
commit
98576ab8de
2 changed files with 20 additions and 21 deletions
  1. 20 0
      include/fcntl.h
  2. 0 21
      libc/sysdeps/linux/aarch64/bits/fcntl.h

+ 20 - 0
include/fcntl.h

@@ -296,6 +296,26 @@ int name_to_handle_at(int dirfd, const char *pathname,
 int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags);
 #endif
 
+#ifdef __USE_GNU
+# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
+# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
+/* Owner types.  */
+enum __pid_type
+  {
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
+  };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
+struct f_owner_ex
+  {
+    enum __pid_type type;	/* Owner type of ID.  */
+    __pid_t pid;		/* ID of owner.  */
+  };
+#endif
+
 __END_DECLS
 
 #endif /* fcntl.h  */

+ 0 - 21
libc/sysdeps/linux/aarch64/bits/fcntl.h

@@ -94,8 +94,6 @@
 #ifdef __USE_GNU
 # define F_SETSIG	10	/* Set number of signal to be sent.  */
 # define F_GETSIG	11	/* Get number of signal to be sent.  */
-# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
-# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
 #endif
 
 
@@ -170,25 +168,6 @@ struct flock64
   };
 #endif
 
-
-#ifdef __USE_GNU
-/* Owner types.  */
-enum __pid_type
-  {
-    F_OWNER_TID = 0,		/* Kernel thread.  */
-    F_OWNER_PID,		/* Process.  */
-    F_OWNER_PGRP,		/* Process group.  */
-    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
-  };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
-struct f_owner_ex
-  {
-    enum __pid_type type;	/* Owner type of ID.  */
-    __pid_t pid;		/* ID of owner.  */
-  };
-#endif
-
 /* Define some more compatibility macros to be backward compatible with
    BSD systems which did not managed to hide these kernel macros.  */
 #ifdef	__USE_BSD