mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
xmlconfig: Use static inline for regex fallback to prevent -O0 issues
A non-static inline function body is only actually emitted by GCC during optimization passes, so running -O0 ends up never emitting the body, producing linker errors. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12158>
This commit is contained in:
parent
7939094d65
commit
68ff6f8be5
1 changed files with 3 additions and 3 deletions
|
|
@ -48,9 +48,9 @@ typedef int regex_t;
|
|||
#define REG_EXTENDED 0
|
||||
#define REG_NOSUB 0
|
||||
#define REG_NOMATCH 1
|
||||
inline int regcomp(regex_t *r, const char *s, int f) { return 0; }
|
||||
inline int regexec(regex_t *r, const char *s, int n, void *p, int f) { return REG_NOMATCH; }
|
||||
inline void regfree(regex_t* r) {}
|
||||
static inline int regcomp(regex_t *r, const char *s, int f) { return 0; }
|
||||
static inline int regexec(regex_t *r, const char *s, int n, void *p, int f) { return REG_NOMATCH; }
|
||||
static inline void regfree(regex_t* r) {}
|
||||
#else
|
||||
#include <regex.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue