1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 19:33:59 +02:00
openwrt-packages/libs/alsa-lib/patches/006-properly-define-S_IRUSR.patch
Sebastian Kemper dc7f2ccad2 alsa-lib: fix uClibc builds
Currently alsa-lib fails to build on uClibc:

parser.c: In function 'snd_tplg_build_file':
parser.c:262:35: error: 'S_IRUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                   ^
parser.c:262:35: note: each undeclared identifier is reported only once for each function it appears in
parser.c:262:45: error: 'S_IWUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                             ^
parser.c: In function 'snd_tplg_build':
parser.c:330:35: error: 'S_IRUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                   ^
parser.c:330:45: error: 'S_IWUSR' undeclared (first use in this function)
   open(outfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
                                             ^
Makefile:390: recipe for target 'parser.lo' failed

Fix this by adding an upstream fix as a backport.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-01-27 11:49:02 +01:00

33 lines
981 B
Diff

From 3f1dba9a821b53b42001605f9a126a958804884f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 9 Nov 2015 13:37:26 +0100
Subject: [PATCH] topology: Add missing include sys/stat.h
Necessary for proper definitions of S_IRUSR & co. Otherwise it
results in compile errors with old glibc:
parser.c: In function 'snd_tplg_build_file':
parser.c:262: error: 'S_IRUSR' undeclared (first use in this function)
parser.c:262: error: (Each undeclared identifier is reported only once
parser.c:262: error: for each function it appears in.)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/topology/parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/topology/parser.c b/src/topology/parser.c
index 80a0ae0..18bb9c7 100644
--- a/src/topology/parser.c
+++ b/src/topology/parser.c
@@ -16,6 +16,7 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
+#include <sys/stat.h>
#include "list.h"
#include "tplg_local.h"
--
1.7.11.7