Commit 67bc0ae
committed
mgt: Typo in pthread.h (un)safety net
I was trying to add a safety net to catch pthread usage in MGT code and
eventually ran into this. Unfortunately, it didn't catch the pthread.h
inclusion from #4231, because it happened in a header file included
after mgt.h and in general we should avoid including anything from
header files, letting C files include everything needed.
This is at least the model for functions like getaddrinfo(): netdb.h
does not include sys/types.h and sys/socket.h on our behalf.
I'm not sure how to formalize this check beyond a rule to remember
during code reviews. I said in #4346 that I'd like to add a build-time
check but it already exists and for now the only way to uphold it is
discipline.1 parent 0f1b1c0 commit 67bc0ae
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
0 commit comments