Fix build under NetBSD 6, PR pkg/48893.

This commit is contained in:
ryoon 2014-06-11 14:45:09 +00:00
parent 332d207950
commit bf2d597be1
2 changed files with 11 additions and 5 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2014/06/09 12:34:26 ryoon Exp $
$NetBSD: distinfo,v 1.7 2014/06/11 14:45:09 ryoon Exp $
SHA1 (alsa-utils-1.0.27.2.tar.bz2) = dfec4691dde6b2cee292bbd10f0f368158713e8f
RMD160 (alsa-utils-1.0.27.2.tar.bz2) = 05432f3f795a43a42d43e7589235060eb83298f6
@ -7,6 +7,6 @@ SHA1 (patch-aa) = 78087e7a7fe860e002d592b0c7b83e98b10ea2c3
SHA1 (patch-ab) = ecc172cd62997d6c645b5e798776cc98a493cd61
SHA1 (patch-ac) = 5f13043e6f7864bb88b13f0123ce8114995db8be
SHA1 (patch-ad) = 4da5adfbd3fcc0611c6394bf00f2b684e735dbd2
SHA1 (patch-alsaloop_alsaloop.c) = c8dee09e2d6e9082448f9bb003accb62ebd60d8c
SHA1 (patch-alsaloop_alsaloop.c) = 469b00a0ffa7ab3bca752bd61e458026100628fe
SHA1 (patch-alsaloop_pcmjob.c) = ae340dde8532d3a1253d4ff38782f17fbf2d381e
SHA1 (patch-alsamixer_volume__mapping.c) = 8c2f00a170238653a557387e878524e8d3aceb18

View file

@ -1,19 +1,25 @@
$NetBSD: patch-alsaloop_alsaloop.c,v 1.1 2014/06/09 12:34:26 ryoon Exp $
$NetBSD: patch-alsaloop_alsaloop.c,v 1.2 2014/06/11 14:45:09 ryoon Exp $
--- alsaloop/alsaloop.c.orig 2013-07-09 15:28:37.000000000 +0000
+++ alsaloop/alsaloop.c
@@ -24,6 +24,10 @@
@@ -24,6 +24,16 @@
#include <stdlib.h>
#include <string.h>
#include <sched.h>
+/* For ERESTART */
+#if defined(__NetBSD__)
+#include <sys/param.h>
+/* NetBSD 6 does not have _KMEMUSER. And _KERNEL breaks build of alsa-utils. */
+#if __NetBSD_Version__ < 699000000
+#define ERESTART -3
+#else
+#define _KMEMUSER 1
+#endif
+#endif
#include <errno.h>
#include <getopt.h>
#include <alsa/asoundlib.h>
@@ -34,6 +38,10 @@
@@ -34,6 +44,10 @@
#include <sys/signal.h>
#include "alsaloop.h"