Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145974561
D15679.id43397.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15679.id43397.diff
View Options
Index: sys/sys/event.h
===================================================================
--- sys/sys/event.h
+++ sys/sys/event.h
@@ -49,8 +49,27 @@
#define EVFILT_EMPTY (-13) /* empty send socket buf */
#define EVFILT_SYSCOUNT 13
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define EV_SET(kevp_, a, b, c, d, e, f) do { \
- struct kevent *kevp = (kevp_); \
+ *(kevp_) = (struct kevent){ \
+ .ident = (a), \
+ .filter = (b), \
+ .flags = (c), \
+ .fflags = (d), \
+ .data = (e), \
+ .udata = (f), \
+ .ext[0] = 0, \
+ .ext[1] = 0, \
+ .ext[2] = 0, \
+ .ext[3] = 0, \
+ }; \
+} while(0)
+#else /* Pre-C99 */
+/* The definition of the local variable kevp could possibly conflict
+ * with a user-defined value passed in parameters a-f.
+ */
+#define EV_SET(kevp_, a, b, c, d, e, f) do { \
+ struct = kevent kevp *(kevp) = (kevp_); \
(kevp)->ident = (a); \
(kevp)->filter = (b); \
(kevp)->flags = (c); \
@@ -62,6 +81,7 @@
(kevp)->ext[2] = 0; \
(kevp)->ext[3] = 0; \
} while(0)
+#endif
struct kevent {
__uintptr_t ident; /* identifier for this event */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 4:30 PM (16 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29035868
Default Alt Text
D15679.id43397.diff (1 KB)
Attached To
Mode
D15679: Remove potential identifier conflict in the EV_SET macro.
Attached
Detach File
Event Timeline
Log In to Comment