]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix port definition in HURD_PORT_USE_CANCEL
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 28 Jun 2020 17:00:47 +0000 (17:00 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 28 Jun 2020 18:04:26 +0000 (18:04 +0000)
* sysdeps/hurd/include/hurd/port.h: Include <libc-lock.h>.
(HURD_PORT_USE_CANCEL): Add local port variable.

sysdeps/hurd/include/hurd/port.h

index 7828dd6fc13dfa44bc2a20da803508b1ddcdc8f0..e8c4b713381fdd5c4452266364ad709fff9977e9 100644 (file)
@@ -2,6 +2,8 @@
 #include_next <hurd/port.h>
 
 #ifndef _ISOMAC
+#include <libc-lock.h>
+
 struct _hurd_port_use_data
   {
      struct hurd_port *p;
@@ -14,6 +16,7 @@ extern void _hurd_port_use_cleanup (void *arg);
 /* Like HURD_PORT_USE, but cleans fd on cancel.  */
 #define        HURD_PORT_USE_CANCEL(portcell, expr)                                  \
   ({ struct _hurd_port_use_data __d;                                         \
+     mach_port_t port;                                                       \
      __typeof(expr) __result;                                                \
      void *__crit;                                                           \
      __d.p = (portcell);                                                     \