Ports using -lossaudio still call open(2) to get a file descriptor they don't actually use but expect open(2), to succeed.
This diff makes ports open /dev/null instead of /dev/mixer which ensures programs continue to work after /dev/mixer is removed. It would be better to not use a file descriptor at all, but I don't want to take any risks now; yet I'd prefer spending time on making ports use sioctl_open() rather that optimizing -lossaudio usage. OK? (gstreamer-0.10 is missing from this list because I already sent a separate diff for it) Index: sysutils/gkrellm/plugins/volume/Makefile =================================================================== RCS file: /cvs/ports/sysutils/gkrellm/plugins/volume/Makefile,v retrieving revision 1.24 diff -u -p -u -p -r1.24 Makefile --- sysutils/gkrellm/plugins/volume/Makefile 15 Sep 2017 15:37:18 -0000 1.24 +++ sysutils/gkrellm/plugins/volume/Makefile 14 Apr 2020 07:58:56 -0000 @@ -5,7 +5,7 @@ COMMENT= volume dial for Gkrellm2 V= 2.1.13 DISTNAME= gkrellm-volume-${V} PKGNAME= gkrellmvolume-${V} -REVISION= 11 +REVISION= 12 CATEGORIES= audio HOMEPAGE= http://gkrellm.luon.net/volume.phtml Index: sysutils/gkrellm/plugins/volume/patches/patch-oss_mixer_c =================================================================== RCS file: /cvs/ports/sysutils/gkrellm/plugins/volume/patches/patch-oss_mixer_c,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-oss_mixer_c --- sysutils/gkrellm/plugins/volume/patches/patch-oss_mixer_c 20 Jan 2005 20:19:40 -0000 1.1 +++ sysutils/gkrellm/plugins/volume/patches/patch-oss_mixer_c 14 Apr 2020 07:58:56 -0000 @@ -1,6 +1,7 @@ $OpenBSD: patch-oss_mixer_c,v 1.1 2005/01/20 20:19:40 sturm Exp $ ---- oss_mixer.c.orig Wed Jan 19 21:49:53 2005 -+++ oss_mixer.c Wed Jan 19 21:50:09 2005 +Index: oss_mixer.c +--- oss_mixer.c.orig ++++ oss_mixer.c @@ -30,7 +30,7 @@ #if defined(__FreeBSD__) && __FreeBSD_version < 500000 #include <machine/soundcard.h> @@ -10,3 +11,12 @@ $OpenBSD: patch-oss_mixer_c,v 1.1 2005/0 #endif #include "mixer.h" +@@ -138,7 +138,7 @@ oss_mixer_device_set_volume(mixer_t *mixer, int devid, + static mixer_idz_t * + oss_mixer_get_id_list(void) { + mixer_idz_t *result = NULL; +- char *device[] = { "/dev/mixer*","/dev/sound/mixer*"}; ++ char *device[] = {"/dev/null"}; + glob_t pglob; + int i,n; + Index: sysutils/conky/Makefile =================================================================== RCS file: /cvs/ports/sysutils/conky/Makefile,v retrieving revision 1.58 diff -u -p -u -p -r1.58 Makefile --- sysutils/conky/Makefile 12 Jul 2019 21:02:26 -0000 1.58 +++ sysutils/conky/Makefile 14 Apr 2020 07:58:56 -0000 @@ -7,7 +7,7 @@ COMMENT= light-weight system monitor DISTNAME= conky-1.9.0 CATEGORIES= sysutils HOMEPAGE= http://conky.sourceforge.net/ -REVISION= 18 +REVISION= 19 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=conky/} Index: sysutils/conky/patches/patch-src_mixer_c =================================================================== RCS file: sysutils/conky/patches/patch-src_mixer_c diff -N sysutils/conky/patches/patch-src_mixer_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/conky/patches/patch-src_mixer_c 14 Apr 2020 07:58:56 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: src/mixer.c +--- src/mixer.c.orig ++++ src/mixer.c +@@ -48,7 +48,7 @@ + #endif /* __OpenBSD__ */ + #endif /* HAVE_LINUX_SOUNDCARD_H */ + +-#define MIXER_DEV "/dev/mixer" ++#define MIXER_DEV "/dev/null" + + static int mixer_fd; + static const char *devs[] = SOUND_DEVICE_NAMES; Index: sysutils/tpb/Makefile =================================================================== RCS file: /cvs/ports/sysutils/tpb/Makefile,v retrieving revision 1.26 diff -u -p -u -p -r1.26 Makefile --- sysutils/tpb/Makefile 12 Jul 2019 20:49:53 -0000 1.26 +++ sysutils/tpb/Makefile 14 Apr 2020 07:58:56 -0000 @@ -6,7 +6,7 @@ ONLY_FOR_ARCHS= amd64 i386 COMMENT= utility to use ibm thinkpad(tm) special keys DISTNAME= tpb-0.6.4 -REVISION= 7 +REVISION= 8 CATEGORIES= sysutils HOMEPAGE= http://www.nongnu.org/tpb/ Index: sysutils/tpb/patches/patch-src_cfg_h =================================================================== RCS file: sysutils/tpb/patches/patch-src_cfg_h diff -N sysutils/tpb/patches/patch-src_cfg_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/tpb/patches/patch-src_cfg_h 14 Apr 2020 07:58:56 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: src/cfg.h +--- src/cfg.h.orig ++++ src/cfg.h +@@ -42,7 +42,7 @@ enum mode {MODE_COMMENT, MODE_INDENT, MODE_KEYWORD, MO + #define DEFAULT_NVRAMDEV_DEVFS "/dev/misc/nvram" + #define DEFAULT_MIXER STATE_OFF + #define DEFAULT_MIXERSTEPS 14 +-#define DEFAULT_MIXERDEV "/dev/mixer" ++#define DEFAULT_MIXERDEV "/dev/null" + #ifdef HAVE_LIBXOSD + #define DEFAULT_OSD STATE_ON + #define DEFAULT_OSDZOOM UNDEFINED Index: telephony/iaxclient/Makefile =================================================================== RCS file: /cvs/ports/telephony/iaxclient/Makefile,v retrieving revision 1.45 diff -u -p -u -p -r1.45 Makefile --- telephony/iaxclient/Makefile 12 Jul 2019 20:49:55 -0000 1.45 +++ telephony/iaxclient/Makefile 14 Apr 2020 07:58:56 -0000 @@ -6,7 +6,7 @@ COMMENT-tcl= IAX client library, tcl bin DISTNAME= iaxclient-2.1beta3 PKGNAME-main= ${DISTNAME} PKGNAME-tcl= ${DISTNAME:S/iaxclient/iaxclient-tcl/} -REVISION= 26 +REVISION= 27 CATEGORIES= telephony SHARED_LIBS= tcliaxclient02 0.0 \ Index: telephony/iaxclient/patches/patch-lib_portmixer_px_unix_oss_px_unix_oss_c =================================================================== RCS file: /cvs/ports/telephony/iaxclient/patches/patch-lib_portmixer_px_unix_oss_px_unix_oss_c,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-lib_portmixer_px_unix_oss_px_unix_oss_c --- telephony/iaxclient/patches/patch-lib_portmixer_px_unix_oss_px_unix_oss_c 18 Jun 2010 17:32:21 -0000 1.1 +++ telephony/iaxclient/patches/patch-lib_portmixer_px_unix_oss_px_unix_oss_c 14 Apr 2020 07:58:56 -0000 @@ -1,6 +1,8 @@ -$OpenBSD: patch-lib_portmixer_px_unix_oss_px_unix_oss_c,v 1.1 2010/06/18 17:32:21 sebastia Exp $ ---- lib/portmixer/px_unix_oss/px_unix_oss.c.orig Sat Nov 14 13:57:56 2009 -+++ lib/portmixer/px_unix_oss/px_unix_oss.c Sat Nov 14 13:58:45 2009 +$OpenBSD$ + +Index: lib/portmixer/px_unix_oss/px_unix_oss.c +--- lib/portmixer/px_unix_oss/px_unix_oss.c.orig ++++ lib/portmixer/px_unix_oss/px_unix_oss.c @@ -39,6 +39,8 @@ #include <linux/soundcard.h> #elif defined(__FreeBSD__) @@ -10,3 +12,12 @@ $OpenBSD: patch-lib_portmixer_px_unix_os #else #include <machine/soundcard.h> /* JH20010905 */ #endif +@@ -65,7 +67,7 @@ typedef struct PxInfo + int recs[SOUND_MIXER_NRDEVICES]; + } PxInfo; + +-char PxDevice[20] = "/dev/mixerX"; ++char PxDevice[20] = "/dev//nullX"; + + int PxNumDevices = 0; + int PxDevices[10];