mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
os: First check for __GLIBC__ and then for PIPE_OS_BSD
Fixes FTBFS on kfreebsd-*
Debian GNU/kFreeBSD doesn't provide getprogname() since it uses stdlib.h
from glibc. Instead it provides program_invocation_short_name from glibc.
You can find the same order in src/mesa/drivers/dri/common/xmlconfig.c
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Tested-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 32637f56a5)
This commit is contained in:
parent
5461cc1f00
commit
faec15dc7a
1 changed files with 4 additions and 4 deletions
|
|
@ -32,10 +32,10 @@
|
||||||
|
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
|
|
||||||
# include <stdlib.h>
|
|
||||||
#elif defined(__GLIBC__)
|
#elif defined(__GLIBC__)
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
|
||||||
|
# include <stdlib.h>
|
||||||
#else
|
#else
|
||||||
#warning unexpected platform in os_process.c
|
#warning unexpected platform in os_process.c
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -68,11 +68,11 @@ os_get_process_name(char *procname, size_t size)
|
||||||
|
|
||||||
name = lpProcessName;
|
name = lpProcessName;
|
||||||
|
|
||||||
|
#elif defined(__GLIBC__)
|
||||||
|
name = program_invocation_short_name;
|
||||||
#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
|
#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE)
|
||||||
/* *BSD and OS X */
|
/* *BSD and OS X */
|
||||||
name = getprogname();
|
name = getprogname();
|
||||||
#elif defined(__GLIBC__)
|
|
||||||
name = program_invocation_short_name;
|
|
||||||
#else
|
#else
|
||||||
#warning unexpected platform in os_process.c
|
#warning unexpected platform in os_process.c
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue