aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2020-03-13 09:18:28 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2020-03-13 09:18:28 +0000
commitefd6d26f789c5da58b8053cf3311877200be19b9 (patch)
treef44b879f29821bde4857621dec81568aa02484d5
parentb94a1da4ad808e1a0f4714a34b8be486ef8e28ba (diff)
downloadsrc-efd6d26f789c5da58b8053cf3311877200be19b9.tar.gz
src-efd6d26f789c5da58b8053cf3311877200be19b9.zip
MFC r358841:
Fix for building libusb under Linux. Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/stable/10/; revision=358949
-rw-r--r--lib/libusb/libusb_global_linux.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libusb/libusb_global_linux.h b/lib/libusb/libusb_global_linux.h
index 13d344a92ea0..0d4746a9ac0a 100644
--- a/lib/libusb/libusb_global_linux.h
+++ b/lib/libusb/libusb_global_linux.h
@@ -75,4 +75,11 @@
} while (0)
#endif
+#ifndef TAILQ_FOREACH_SAFE
+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = TAILQ_FIRST((head)); \
+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
+ (var) = (tvar))
+#endif
+
#endif /* _LIBUSB_GLOBAL_LINUX_H_ */