mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mesa: fix Windows build error related to getuid()
getuid() and geteuid() are not present on Windows. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
dd4488ea6c
commit
9bfecb03c5
1 changed files with 6 additions and 2 deletions
|
|
@ -1211,8 +1211,12 @@ _mesa_initialize_context(struct gl_context *ctx,
|
||||||
/* KHR_no_error is likely to crash, overflow memory, etc if an application
|
/* KHR_no_error is likely to crash, overflow memory, etc if an application
|
||||||
* has errors so don't enable it for setuid processes.
|
* has errors so don't enable it for setuid processes.
|
||||||
*/
|
*/
|
||||||
if (getenv("MESA_NO_ERROR") && geteuid() == getuid())
|
if (getenv("MESA_NO_ERROR")) {
|
||||||
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
|
#if !defined(_WIN32)
|
||||||
|
if (geteuid() == getuid())
|
||||||
|
#endif
|
||||||
|
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
|
||||||
|
}
|
||||||
|
|
||||||
/* setup the API dispatch tables with all nop functions */
|
/* setup the API dispatch tables with all nop functions */
|
||||||
ctx->OutsideBeginEnd = _mesa_alloc_dispatch_table();
|
ctx->OutsideBeginEnd = _mesa_alloc_dispatch_table();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue