mirror of https://github.com/ericonr/sndio.git
Make sndio buildable on NetBSD, from Kamil Rytarowski <n54 at gmx.com>
This commit is contained in:
parent
2327821cf0
commit
c77ea93344
|
@ -56,6 +56,14 @@ case `uname` in
|
||||||
so="$so libsndio.so"
|
so="$so libsndio.so"
|
||||||
defs='-D_GNU_SOURCE -DDEV_RANDOM=\\"/dev/urandom\\"'
|
defs='-D_GNU_SOURCE -DDEV_RANDOM=\\"/dev/urandom\\"'
|
||||||
;;
|
;;
|
||||||
|
NetBSD)
|
||||||
|
sun=no
|
||||||
|
rmidi=yes
|
||||||
|
user=_sndio
|
||||||
|
so="$so libsndio.so"
|
||||||
|
defs='-DHAVE_ARC4RANDOM -DHAVE_ISSETUGID \\\
|
||||||
|
-DHAVE_STRLCAT -DHAVE_STRLCPY'
|
||||||
|
;;
|
||||||
OpenBSD)
|
OpenBSD)
|
||||||
sun=yes
|
sun=yes
|
||||||
rmidi=yes
|
rmidi=yes
|
||||||
|
|
|
@ -485,8 +485,8 @@ main(int argc, char **argv)
|
||||||
if (setpriority(PRIO_PROCESS, 0, SNDIO_PRIO) < 0)
|
if (setpriority(PRIO_PROCESS, 0, SNDIO_PRIO) < 0)
|
||||||
err(1, "setpriority");
|
err(1, "setpriority");
|
||||||
if (setgroups(1, &pw->pw_gid) ||
|
if (setgroups(1, &pw->pw_gid) ||
|
||||||
setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||
|
setgid(pw->pw_gid) ||
|
||||||
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
|
setuid(pw->pw_uid))
|
||||||
err(1, "cannot drop privileges");
|
err(1, "cannot drop privileges");
|
||||||
}
|
}
|
||||||
midi_init();
|
midi_init();
|
||||||
|
|
Loading…
Reference in New Issue