Skip to content

Commit 67bc0ae

Browse files
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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/varnishd/mgt/mgt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ extern const char *mgt_vcl_path;
248248
extern const char *mgt_vmod_path;
249249

250250
#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT)
251-
#error "Keep pthreads out of in manager process"
251+
#error "Keep pthreads out of the manager process"
252252
#endif
253253

254254
#define MGT_FEATURE(x) COM_FEATURE(mgt_param.feature_bits, x)

0 commit comments

Comments
 (0)