9a13f05721671ef3f0e0d14b7e1e1f75a20099fb
[cascardo/ovs.git] / lib / string.h
1 #ifndef STRING_WRAPPER_H
2 #define STRING_WRAPPER_H 1
3
4 #include_next <string.h>
5
6 /* Glibc 2.7 has a bug in strtok_r when compiling with optimization that can
7  * cause segfaults if the delimiters argument is a compile-time constant that
8  * has exactly 1 character:
9  *
10  *      http://sources.redhat.com/bugzilla/show_bug.cgi?id=5614
11  *
12  * The bug is only present in the inline version of strtok_r(), so force the
13  * out-of-line version to be used instead. */
14 #if HAVE_STRTOK_R_BUG
15 #undef strtok_r
16 #endif
17
18 #endif /* string.h wrapper */