summary refs log tree commit diff
path: root/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-01-13 15:34:57 -0600
committerWill Dietz <w@wdtz.org>2018-02-13 09:44:53 -0600
commit1289cdaf75c76634f664e79268667f094acd3dbc (patch)
treefcb427955924a170600d93ff6665cfcfd95f6ffe /pkgs/development/libraries/mesa
parent2974ed9266174ca579ff3094f9d6d1da71348046 (diff)
downloadnixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.tar
nixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.tar.gz
nixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.tar.bz2
nixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.tar.lz
nixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.tar.xz
nixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.tar.zst
nixpkgs-1289cdaf75c76634f664e79268667f094acd3dbc.zip
mesa: patch to fix w/musl
Diffstat (limited to 'pkgs/development/libraries/mesa')
-rw-r--r--pkgs/development/libraries/mesa/default.nix2
-rw-r--r--pkgs/development/libraries/mesa/musl-fixes.patch22
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 8df248e3e46..fa3336c4cea 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -92,7 +92,7 @@ stdenv.mkDerivation {
   patches = [
     ./glx_ro_text_segm.patch # fix for grsecurity/PaX
     ./symlink-drivers.patch
-  ];
+  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl-fixes.patch;
 
   outputs = [ "out" "dev" "drivers" "osmesa" ];
 
diff --git a/pkgs/development/libraries/mesa/musl-fixes.patch b/pkgs/development/libraries/mesa/musl-fixes.patch
new file mode 100644
index 00000000000..60140d445ae
--- /dev/null
+++ b/pkgs/development/libraries/mesa/musl-fixes.patch
@@ -0,0 +1,22 @@
+--- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
++++ ./src/gallium/winsys/svga/drm/vmw_screen.h
+@@ -34,7 +34,7 @@
+ #ifndef VMW_SCREEN_H_
+ #define VMW_SCREEN_H_
+ 
+-
++#include <sys/stat.h>
+ #include "pipe/p_compiler.h"
+ #include "pipe/p_state.h"
+ 
+--- a/src/util/u_endian.h.orig	2016-11-04 12:16:00.480356454 +0100
++++ b/src/util/u_endian.h	2016-11-04 12:16:11.984347944 +0100
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
+ 
+-#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(ANDROID) || defined(__CYGWIN__)
+ #include <endian.h>
+ 
+ #if __BYTE_ORDER == __LITTLE_ENDIAN