mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
gallium,util: undef ALIGN on FreeBSD to prevent name clash
Some rare headers like ipc/shm and pthread_np cause
machine/param.h to be included which defines a macro called ALIGN.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
(cherry picked from commit 29e2a3b8f5)
This commit is contained in:
parent
6a9eaabeaa
commit
e0f87f0ace
3 changed files with 11 additions and 1 deletions
|
|
@ -2470,7 +2470,7 @@
|
|||
"description": "gallium,util: undef ALIGN on FreeBSD to prevent name clash",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@
|
|||
#ifdef HAVE_SYS_SHM_H
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#ifdef __FreeBSD__
|
||||
/* sys/ipc.h -> sys/_types.h -> machine/param.h
|
||||
* - defines ALIGN which clashes with our ALIGN
|
||||
*/
|
||||
#undef ALIGN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "pipe/p_compiler.h"
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@
|
|||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* pthread_np.h -> sys/param.h -> machine/param.h
|
||||
* - defines ALIGN which clashes with our ALIGN
|
||||
*/
|
||||
#undef ALIGN
|
||||
#define cpu_set_t cpuset_t
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue