public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/
@ 2018-08-22 22:23 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2018-08-22 22:23 UTC (permalink / raw
  To: gentoo-commits

commit:     7463af2dd6beced4cdfdb0ca441f298bd07e6846
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 22 22:17:09 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Aug 22 22:23:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7463af2d

media-libs/nas: EAPI-7, https, drop unused eutils,multilib

Package-Manager: Portage-2.3.48, Repoman-2.3.10

 media-libs/nas/files/nas-1.9.2-asneeded.patch |  4 ++--
 media-libs/nas/nas-1.9.4-r2.ebuild            | 23 +++++++++++++++--------
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/media-libs/nas/files/nas-1.9.2-asneeded.patch b/media-libs/nas/files/nas-1.9.2-asneeded.patch
index 2ac89487a2c..8c588be136f 100644
--- a/media-libs/nas/files/nas-1.9.2-asneeded.patch
+++ b/media-libs/nas/files/nas-1.9.2-asneeded.patch
@@ -1,7 +1,7 @@
 http://bugs.gentoo.org/show_bug.cgi?id=247761
 
---- config/NetAudio.tmpl
-+++ config/NetAudio.tmpl
+--- a/config/NetAudio.tmpl
++++ b/config/NetAudio.tmpl
 @@ -162,7 +162,7 @@
  
    AUDIODEPLIBS = $(DEPAULIB) $(DEPXTOOLLIB) $(DEPXLIB)

diff --git a/media-libs/nas/nas-1.9.4-r2.ebuild b/media-libs/nas/nas-1.9.4-r2.ebuild
index f1d536a4f7b..909424ef8e2 100644
--- a/media-libs/nas/nas-1.9.4-r2.ebuild
+++ b/media-libs/nas/nas-1.9.4-r2.ebuild
@@ -1,11 +1,12 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit eutils multilib toolchain-funcs multilib-minimal
+EAPI=7
+
+inherit multilib-minimal toolchain-funcs
 
 DESCRIPTION="Network Audio System"
-HOMEPAGE="http://radscan.com/nas.html"
+HOMEPAGE="https://radscan.com/nas.html"
 SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz"
 
 LICENSE="HPND MIT"
@@ -13,7 +14,8 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
 IUSE="doc static-libs"
 
-RDEPEND="x11-libs/libICE
+RDEPEND="
+	x11-libs/libICE
 	x11-libs/libSM
 	x11-libs/libX11
 	>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
@@ -32,10 +34,13 @@ DEPEND="${RDEPEND}
 
 DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
 
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.9.2-asneeded.patch
-	epatch "${FILESDIR}"/${PN}-1.9.4-remove-abs-fabs.patch
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.9.2-asneeded.patch
+	"${FILESDIR}"/${PN}-1.9.4-remove-abs-fabs.patch
+)
 
+src_prepare() {
+	default
 	multilib_copy_sources
 }
 
@@ -99,5 +104,7 @@ multilib_src_install_all() {
 	newconfd "${FILESDIR}"/nas.conf.d nas
 	newinitd "${FILESDIR}"/nas.init.d nas
 
-	use static-libs || rm -f "${D}"/usr/lib*/libaudio.a
+	if ! use static-libs; then
+		rm -f "${D}"/usr/lib*/libaudio.a || die
+	fi
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/
@ 2022-03-18  9:23 Miroslav Šulc
  0 siblings, 0 replies; 5+ messages in thread
From: Miroslav Šulc @ 2022-03-18  9:23 UTC (permalink / raw
  To: gentoo-commits

commit:     621b535d366a74524bfc90a075b353a9f96879da
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 18 09:23:45 2022 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 09:23:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=621b535d

media-libs/nas: removed obsolete 1.9.4-r2

Bug: https://bugs.gentoo.org/show_bug.cgi?id=835124
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-libs/nas/Manifest                            |   1 -
 media-libs/nas/files/nas-1.9.4-fno-config.patch    |  42 --------
 .../nas/files/nas-1.9.4-remove-abs-fabs.patch      |  36 -------
 media-libs/nas/nas-1.9.4-r2.ebuild                 | 115 ---------------------
 4 files changed, 194 deletions(-)

diff --git a/media-libs/nas/Manifest b/media-libs/nas/Manifest
index ec48daf7ff4a..350414fb2ed0 100644
--- a/media-libs/nas/Manifest
+++ b/media-libs/nas/Manifest
@@ -1,2 +1 @@
-DIST nas-1.9.4.src.tar.gz 1464598 BLAKE2B d79ecda9f86a89d2d61bfadfeee4bb6a9feca6754bb88249b1eb3c1964e784d18098465f30f1b5bbb13d0550aebf48bb1b98aeb1b7c712f344a2eddc7720531b SHA512 3f8bd60f8ce0f25a2605af17caaadfe4f21223ba4cd3fa02078d1427b17cdf33ebda887e5dc30cd68eb7f64bfad80aafc9071ff0a26f0d3a4a93caacac03b5bb
 DIST nas-1.9.5.tar.gz 1170144 BLAKE2B 81b063f888d66534f8779d6b0534397ada703868ff711c49b998fbf56bc6e4313fa245b6168fe9913936afa0685bab595df24f9f4bd5663dfa560c4b64534466 SHA512 051b32593e7ace09cf2d12720fb80e38d4f83f36858debacfb828c759e98b3e29401c76e3e3770f57fbbd1750a84b17a18e712f0de3dbe0ff56f2505c2488d9a

diff --git a/media-libs/nas/files/nas-1.9.4-fno-config.patch b/media-libs/nas/files/nas-1.9.4-fno-config.patch
deleted file mode 100644
index e5ce72d37d9a..000000000000
--- a/media-libs/nas/files/nas-1.9.4-fno-config.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From f1e8e0da221152560efcb097c00539476071047c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
-Date: Thu, 23 Jan 2020 13:43:12 +0100
-Subject: [PATCH] Fix building with GCC 10
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GCC 10 defaults to -fno-common and as a result raises an arror when
-linking nasd:
-
-gcc -o nasd -O2 -fno-strict-aliasing   -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -L../lib/audio -L/usr/lib64 -L/usr/lib64    dia/libdia.a dda/voxware/libvoxware.a os/libos.a
-/usr/bin/ld: dia/libdia.a(lex.o): in function `$d':
-lex.c:(.bss+0x48): multiple definition of `yyin'; dia/libdia.a(main.o):/builddir/build/BUILD/nas-1.9.4/server/dia/main.c:79: first defined here
-collect2: error: ld returned 1 exit status
-
-The reason is that both lex.c (generated from lex.l) and main.c
-define yyin global variable.
-
-This patch changes the main.c definition into a declaration.
-
-Signed-off-by: Petr Písař <ppisar@redhat.com>
----
- server/dia/main.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/server/dia/main.c b/server/dia/main.c
-index 462e89b..9ea2a12 100644
---- a/server/dia/main.c
-+++ b/server/dia/main.c
-@@ -76,7 +76,7 @@ static char *AuServerName(void);
- extern char *display;
- 
- static int restart = 0;
--FILE *yyin;                     /* for the config parser */
-+extern FILE *yyin;                     /* for the config parser */
- 
- void
- NotImplemented()
--- 
-2.26.2
-

diff --git a/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch b/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch
deleted file mode 100644
index 46ef6bb4610e..000000000000
--- a/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 212309075d26668f6e25f30754e646952843cf61 Mon Sep 17 00:00:00 2001
-From: "Anthony G. Basile" <blueness@gentoo.org>
-Date: Tue, 28 Apr 2015 18:56:46 -0600
-Subject: [PATCH] 
-
-On a uClibc system, the macro definitions of abs() and fabs()
- cause the build to fail.  Since these are specified by POSIX, it is safe to
- just drop their definition.  This has been tested on uClibc, glibc and musl.
-
-See: https://bugs.gentoo.org/show_bug.cgi?id=510766
-
-Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
----
- server/include/misc.h | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/server/include/misc.h b/server/include/misc.h
-index 2267ae0..fb904c8 100644
---- a/server/include/misc.h
-+++ b/server/include/misc.h
-@@ -71,12 +71,6 @@ typedef int Bool;
- 
- #define min(a, b) (((a) < (b)) ? (a) : (b))
- #define max(a, b) (((a) > (b)) ? (a) : (b))
--#ifndef abs
--#define abs(a) ((a) > 0 ? (a) : -(a))
--#endif
--#ifndef fabs
--#define fabs(a) ((a) > 0.0 ? (a) : -(a))        /* floating absolute value */
--#endif
- #define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
- /* this assumes b > 0 */
- #define modulus(a, b, d)    if (((d) = (a) % (b)) < 0) (d) += (b)
--- 
-2.0.5
-

diff --git a/media-libs/nas/nas-1.9.4-r2.ebuild b/media-libs/nas/nas-1.9.4-r2.ebuild
deleted file mode 100644
index de678c811d99..000000000000
--- a/media-libs/nas/nas-1.9.4-r2.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal toolchain-funcs
-
-DESCRIPTION="Network Audio System"
-HOMEPAGE="https://radscan.com/nas.html"
-SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz"
-
-LICENSE="HPND MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
-IUSE="doc static-libs"
-
-RDEPEND="
-	x11-libs/libICE
-	x11-libs/libSM
-	x11-libs/libX11
-	>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
-	x11-libs/libXaw
-	x11-libs/libXext
-	x11-libs/libXmu
-	x11-libs/libXpm
-	>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	app-text/rman
-	sys-devel/bison
-	sys-devel/flex
-	x11-base/xorg-proto
-	x11-misc/gccmakedep
-	riscv? ( >=x11-misc/xorg-cf-files-1.0.7-r1 )
-	>=x11-misc/imake-1.0.8-r1"
-
-DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
-
-PATCHES=(
-	"${FILESDIR}/${PN}-1.9.2-asneeded.patch"
-	"${FILESDIR}/${P}-remove-abs-fabs.patch"
-	"${FILESDIR}/${P}-libfl.patch"
-	"${FILESDIR}/${P}-fno-config.patch"
-)
-
-src_prepare() {
-	default
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	# Need to run econf so that config.guess is updated
-	pushd config || die
-	econf
-	popd || die
-	CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \
-		IMAKECPP="${IMAKECPP:-$(tc-getCPP)}" xmkmf -a || die
-}
-
-multilib_src_compile() {
-	# EXTRA_LDOPTIONS, SHLIBGLOBALSFLAGS #336564#c2
-	local emakeopts=(
-		AR="$(tc-getAR) cq"
-		AS="$(tc-getAS)"
-		CC="$(tc-getCC)"
-		CDEBUGFLAGS="${CFLAGS}"
-		CXX="$(tc-getCXX)"
-		CXXDEBUFLAGS="${CXXFLAGS}"
-		EXTRA_LDOPTIONS="${LDFLAGS}"
-		LD="$(tc-getLD)"
-		MAKE="${MAKE:-gmake}"
-		RANLIB="$(tc-getRANLIB)"
-		SHLIBGLOBALSFLAGS="${LDFLAGS}"
-		WORLDOPTS=
-	)
-
-	if multilib_is_native_abi ; then
-		# dumb fix for parallel make issue wrt #446598, Imake sux
-		emake "${emakeopts[@]}" -C server/dia all
-		emake "${emakeopts[@]}" -C server/dda/voxware all
-		emake "${emakeopts[@]}" -C server/os all
-	else
-		sed -i \
-			-e 's/SUBDIRS =.*/SUBDIRS = include lib config/' \
-			Makefile || die
-	fi
-
-	emake "${emakeopts[@]}"
-}
-
-multilib_src_install() {
-	# ranlib is used at install phase too wrt #446600
-	emake RANLIB="$(tc-getRANLIB)" \
-		DESTDIR="${D}" USRLIBDIR=/usr/$(get_libdir) \
-		install install.man
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	if use doc; then
-		docinto doc
-		dodoc doc/{actions,protocol.txt,README}
-		docinto pdf
-		dodoc doc/pdf/*.pdf
-	fi
-
-	mv -vf "${D}"/etc/nas/nasd.conf{.eg,} || die
-
-	newconfd "${FILESDIR}"/nas.conf.d nas
-	newinitd "${FILESDIR}"/nas.init.d nas
-
-	if ! use static-libs; then
-		rm -f "${D}"/usr/lib*/libaudio.a || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/
@ 2024-03-20  6:26 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-03-20  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     2034f4dc27f765d1d8ab8eddaf4142a3286dfa29
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 20 03:13:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:17:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2034f4dc

media-libs/nas: backport upstreamed patches to fix Modern C bugs

Closes: https://bugs.gentoo.org/873619
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...as-1.9.5-Correct-pointer-types-for-GCC-14.patch | 108 +++
 ...o-implicit-ints-and-function-declarations.patch | 834 +++++++++++++++++++++
 media-libs/nas/nas-1.9.5-r1.ebuild                 | 121 +++
 3 files changed, 1063 insertions(+)

diff --git a/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch b/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch
new file mode 100644
index 000000000000..1ed7dae2d48c
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch
@@ -0,0 +1,108 @@
+From cffa7bbc124f775520914a0cfb0ede619a05e07d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 2 Feb 2024 16:05:11 +0100
+Subject: [PATCH] Correct pointer types for GCC 14
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 14 became pickier about pointer types:
+
+auth.c:71:26: error: initialization of ‘int (*)()’ from incompatible pointer type ‘int (*)(short unsigned int,  char *)’ [-Wincompatible-pointer-types]
+   71 |      MitToID, MitFromID, MitRemoveCookie,
+      |                          ^~~~~~~~~~~~~~~
+
+Including const correctness:
+
+audemo.c: In function ‘rescanCB’:
+audemo.c:524:23: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
+  524 |                       makeFileList(globals->fileNames, globals->numFiles),
+      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      |                       |
+      |                       char **
+
+This patch fixes these errors.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ clients/audio/audemo/audemo.c | 28 ++++++++++++++--------------
+ server/os/auth.c              |  2 +-
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/clients/audio/audemo/audemo.c b/clients/audio/audemo/audemo.c
+index 5617cf7..e77b95d 100644
+--- a/clients/audio/audemo/audemo.c
++++ b/clients/audio/audemo/audemo.c
+@@ -500,11 +500,11 @@ newBucketCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ static void
+ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ {
+-    GlobalDataPtr   globals = (GlobalDataPtr) globalsp;
+-    static char    *noFilesString = "No files found";
+-    char           *dir,
+-                   *template;
+-    int             i;
++    GlobalDataPtr       globals = (GlobalDataPtr) globalsp;
++    static const char   *noFilesString = "No files found";
++    char                *dir,
++                        *template;
++    int                 i;
+ 
+     if (globals->numFiles)
+     {
+@@ -521,7 +521,7 @@ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
+     if (globals->numFiles)
+     {
+ 	XawListChange(globals->samples,
+-		      makeFileList(globals->fileNames, globals->numFiles),
++		      (const char **)makeFileList(globals->fileNames, globals->numFiles),
+ 		      globals->numFiles, -1, True);
+ 	XtSetSensitive(globals->samples, True);
+     }
+@@ -591,13 +591,13 @@ bucketPlayCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ static void
+ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ {
+-    GlobalDataPtr   globals = (GlobalDataPtr) globalsp;
++    GlobalDataPtr       globals = (GlobalDataPtr) globalsp;
+     BucketDialogDataPtr buf = &globals->buf;
+-    char            tmp[200],
+-                    access[4],
+-                    desc[COMMENT_LEN];
+-    int             i;
+-    static char    *noBucketString = "No buckets";
++    char                tmp[200],
++                        access[4],
++			desc[COMMENT_LEN];
++    int                 i;
++    static const char  *noBucketString = "No buckets";
+ 
+     if (buf->numBuckets)
+     {
+@@ -652,8 +652,8 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ 
+     if (buf->numBuckets)
+     {
+-	XawListChange(buf->bucketList, buf->bucketText, buf->numBuckets, -1,
+-		      True);
++	XawListChange(buf->bucketList, (const char **)buf->bucketText,
++	              buf->numBuckets, -1, True);
+ 	XtSetSensitive(buf->bucketList, True);
+     }
+     else
+diff --git a/server/os/auth.c b/server/os/auth.c
+index a80a257..9488db7 100644
+--- a/server/os/auth.c
++++ b/server/os/auth.c
+@@ -55,7 +55,7 @@ struct protocol {
+     int (*Reset) ();            /* delete all authorization data entries */
+         AuID(*ToID) ();         /* convert cookie to ID */
+     int (*FromID) ();           /* convert ID to cookie */
+-    int (*Remove) ();           /* remove a specific cookie */
++    int (*Remove) (unsigned short, char *);     /* remove a specific cookie */
+ };
+ 
+ extern int MitAddCookie();
+-- 
+2.43.0
+

diff --git a/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch b/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch
new file mode 100644
index 000000000000..a3a7e50efdec
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch
@@ -0,0 +1,834 @@
+From 0e08ed6753a547637a39ede05a006d9b730647df Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Tue, 22 Nov 2022 13:11:26 +0100
+Subject: [PATCH] No implicit ints and function declarations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 13 or 14 is going to remove some old and by C99 standard obsolete
+features, like implicit int types and implicit function declararations,
+from an implicit gnu18 compilator standard. The compiler will report
+an error instead:
+
+conftest.c:62:1: error: type defaults to 'int' in declaration of 'main'
+   62 | main()
+      | ^~~~
+conftest.c:65:3: error: implicit declaration of function 'exit'
+   65 |   exit(0);
+      |   ^~~~
+
+This patch adjusts the code to remain compilable. For some functions,
+it fixes their return type from int to void. Few functions which
+apparantly are internal to a compilatation unit were made static.
+_AuSendClientPrefix() was declared in a public header.
+
+Tested with an instrumented GCC 13.0.1.
+
+<https://fedoraproject.org/wiki/Changes/PortingToModernC>
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ clients/audio/auctl/execute.c     |  1 +
+ clients/audio/auplay/auplay.c     |  1 +
+ clients/audio/examples/playFile.c |  1 +
+ config/configure.ac               |  5 +-
+ config/filelist                   |  3 ++
+ lib/audio/Alibint.h               |  8 ++++
+ lib/audio/ConnSvr.c               |  3 ++
+ server/dda/voxware/auvoxware.c    |  3 +-
+ server/dda/voxware/config.c       |  2 +
+ server/dia/au.h                   |  2 +
+ server/dia/gram.y                 |  1 +
+ server/include/access.h           | 36 ++++++++++++++
+ server/include/auth.h             | 27 +++++++++++
+ server/include/dix.h              |  6 ++-
+ server/include/io.h               | 29 ++++++++++++
+ server/include/os.h               |  2 +
+ server/os/access.c                | 79 +++++++++++++++++--------------
+ server/os/auth.c                  | 11 ++++-
+ server/os/connection.c            | 23 +++++++--
+ server/os/daemon.c                |  4 ++
+ server/os/io.c                    |  3 +-
+ server/os/mitauth.c               |  2 +
+ server/os/osdep.h                 |  5 ++
+ 23 files changed, 211 insertions(+), 46 deletions(-)
+ create mode 100644 server/include/access.h
+ create mode 100644 server/include/auth.h
+ create mode 100644 server/include/io.h
+
+diff --git a/clients/audio/auctl/execute.c b/clients/audio/auctl/execute.c
+index 12f7c05..fd7a937 100644
+--- a/clients/audio/auctl/execute.c
++++ b/clients/audio/auctl/execute.c
+@@ -22,6 +22,7 @@
+  * $NCDId: @(#)execute.c,v 1.7 1994/04/07 18:10:33 greg Exp $
+  */
+ 
++#include <stdlib.h>
+ #include "auctl.h"
+ 
+ static int _execute_set PROTO((AuServer *, int, char **));
+diff --git a/clients/audio/auplay/auplay.c b/clients/audio/auplay/auplay.c
+index 4037a64..c9d880e 100644
+--- a/clients/audio/auplay/auplay.c
++++ b/clients/audio/auplay/auplay.c
+@@ -146,6 +146,7 @@ do_file(char *fname)
+ 	fprintf(stderr, "Couldn't play file \"%s\"\n", fname);
+ }
+ 
++int
+ main(int argc, char **argv)
+ {
+     int             i,
+diff --git a/clients/audio/examples/playFile.c b/clients/audio/examples/playFile.c
+index 646077e..e8828a8 100644
+--- a/clients/audio/examples/playFile.c
++++ b/clients/audio/examples/playFile.c
+@@ -13,6 +13,7 @@
+ #include <audio/audiolib.h>
+ #include <audio/soundlib.h>
+ 
++int
+ main(int argc, char **argv)
+ {
+     char           *file = argv[1];
+diff --git a/config/configure.ac b/config/configure.ac
+index d99bedb..e57c27e 100644
+--- a/config/configure.ac
++++ b/config/configure.ac
+@@ -65,11 +65,12 @@ dnl check for sys_errlist decl
+ 
+ AC_MSG_CHECKING(for sys_errlist declaration)
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+-
+ #include <errno.h>
+-main()
++int
++main(void)
+ {
+   char *s = sys_errlist[0];
+   exit(0);
+diff --git a/config/filelist b/config/filelist
+index 9e89dc5..ed1149f 100644
+--- a/config/filelist
++++ b/config/filelist
+@@ -601,9 +601,12 @@
+ ./server/dia/swapreq.c
+ ./server/dia/tables.c
+ ./server/dia
++./server/include/access.h
++./server/include/auth.h
+ ./server/include/site.h
+ ./server/include/dix.h
+ ./server/include/dixstruct.h
++./server/include/io.h
+ ./server/include/misc.h
+ ./server/include/opaque.h
+ ./server/include/os.h
+diff --git a/lib/audio/Alibint.h b/lib/audio/Alibint.h
+index ce554c8..254a37c 100644
+--- a/lib/audio/Alibint.h
++++ b/lib/audio/Alibint.h
+@@ -683,6 +683,14 @@ _AuDisconnectServer(
+     int				/* server */
+ );
+ 
++extern AuBool
++_AuSendClientPrefix (
++     AuServer *aud,
++     auConnClientPrefix *client,    /* contains count for auth_* */
++     char *auth_proto,
++     char *auth_string  /* NOT null-terminated */
++);
++
+ void
+ _AuFreeServerStructure(
+     AuServer  *			/* aud */
+diff --git a/lib/audio/ConnSvr.c b/lib/audio/ConnSvr.c
+index e71bfee..4ea73b1 100644
+--- a/lib/audio/ConnSvr.c
++++ b/lib/audio/ConnSvr.c
+@@ -75,6 +75,9 @@
+ # endif
+ # include <sys/stropts.h>
+ #endif
++#ifdef TCPCONN
++#include <arpa/inet.h>          /* for inet_addr() */
++#endif
+ 
+ #ifdef STREAMSCONN
+ #define select _AuSelect
+diff --git a/server/dda/voxware/auvoxware.c b/server/dda/voxware/auvoxware.c
+index 391514a..851db18 100644
+--- a/server/dda/voxware/auvoxware.c
++++ b/server/dda/voxware/auvoxware.c
+@@ -133,6 +133,7 @@ PERFORMANCE OF THIS SOFTWARE.
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #ifndef SVR4
+ #include <getopt.h>
+ #endif
+@@ -168,6 +169,7 @@ static int debug_msg_indentation = 0;
+ #include "dixstruct.h"          /* for RESTYPE */
+ #include "os.h"                 /* for xalloc/xfree and NULL */
+ #include <fcntl.h>
++#include <sys/ioctl.h>
+ #include <sys/time.h>
+ #include <sys/param.h>
+ #include <assert.h>
+@@ -186,7 +188,6 @@ static int debug_msg_indentation = 0;
+ # include <machine/pcaudioio.h>
+ #else
+ # ifdef __NetBSD__
+-#  include <sys/ioctl.h>
+ #  include <soundcard.h>
+ # else
+ #  include <sys/soundcard.h>
+diff --git a/server/dda/voxware/config.c b/server/dda/voxware/config.c
+index 40aae46..a02e2f5 100644
+--- a/server/dda/voxware/config.c
++++ b/server/dda/voxware/config.c
+@@ -5,6 +5,8 @@
+  */
+ 
+ #include <fcntl.h>
++#include <string.h>
++#include "os.h"
+ #include "nasconf.h"
+ #include "config.h"
+ #include "aulog.h"
+diff --git a/server/dia/au.h b/server/dia/au.h
+index 47dbf8d..b1de3d4 100644
+--- a/server/dia/au.h
++++ b/server/dia/au.h
+@@ -409,6 +409,8 @@ _pFunc AuCallbacks[AuMaxCB];
+         (*AuCallbacks[_n]) _args
+ 
+ #ifndef WAKEUP_SERVER
++#include <signal.h>
++#include <unistd.h>
+ #define WAKEUP_SERVER()         kill(getpid(), SIGUSR1)
+ #endif /* !WAKEUP_SERVER */
+ 
+diff --git a/server/dia/gram.y b/server/dia/gram.y
+index 50b40c7..4757de3 100644
+--- a/server/dia/gram.y
++++ b/server/dia/gram.y
+@@ -16,6 +16,7 @@
+ static char     *ptr;
+ static void RemoveDQuote(char *str);
+ static long parsebool(char *str);
++extern int yylex (void);
+ extern int yylineno;
+ void yyerror(char *s);
+ 
+diff --git a/server/include/access.h b/server/include/access.h
+new file mode 100644
+index 0000000..35a1496
+--- /dev/null
++++ b/server/include/access.h
+@@ -0,0 +1,36 @@
++/***********************************************************
++Copyright 2022 by Petr Pisar.
++
++                        All Rights Reserved
++
++Permission to use, copy, modify, and distribute this software and its 
++documentation for any purpose and without fee is hereby granted, 
++provided that the above copyright notice appear in all copies and that
++both that copyright notice and this permission notice appear in 
++supporting documentation, and that the names of Digital or MIT not be
++used in advertising or publicity pertaining to distribution of the
++software without specific, written prior permission.  
++
++DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
++ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
++DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
++ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
++WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
++ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++SOFTWARE.
++
++******************************************************************/
++
++#ifndef ACCESS_H
++#define ACCESS_H
++int DefineSelf(int fd);
++void EnableLocalHost(void);
++void ResetHosts(char *display);
++
++#ifdef AMOEBA
++int InvalidHost(ipaddr_t *saddr, int len);
++#else
++int InvalidHost(struct sockaddr *saddr, int len);
++#endif
++
++#endif
+diff --git a/server/include/auth.h b/server/include/auth.h
+new file mode 100644
+index 0000000..24c4ce5
+--- /dev/null
++++ b/server/include/auth.h
+@@ -0,0 +1,27 @@
++/***********************************************************
++Copyright 2022 by Petr Pisar.
++
++                        All Rights Reserved
++
++Permission to use, copy, modify, and distribute this software and its 
++documentation for any purpose and without fee is hereby granted, 
++provided that the above copyright notice appear in all copies and that
++both that copyright notice and this permission notice appear in 
++supporting documentation, and that the names of Digital or MIT not be
++used in advertising or publicity pertaining to distribution of the
++software without specific, written prior permission.  
++
++DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
++ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
++DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
++ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
++WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
++ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++SOFTWARE.
++
++******************************************************************/
++
++#ifndef AUTH_H
++#define AUTH_H
++void ResetAuthorization(void);
++#endif
+diff --git a/server/include/dix.h b/server/include/dix.h
+index 27e85a4..bceddf6 100644
+--- a/server/include/dix.h
++++ b/server/include/dix.h
+@@ -26,6 +26,8 @@ SOFTWARE.
+ #ifndef DIX_H
+ #define DIX_H
+ 
++#include "misc.h"   /* for pointer typedef */
++
+ #define EARLIER -1
+ #define SAMETIME 0
+ #define LATER 1
+@@ -84,6 +86,8 @@ extern ClientPtr serverClient;
+ extern int currentMaxClients;
+ extern long *checkForInput[2];
+ 
+-extern void NoopDDA(pointer, AuID);
++extern void NoopDDA(pointer value, AuID id);
++extern void ProcessWorkQueue(void);
++extern Bool QueueWorkProc(Bool(*function)(void), ClientPtr client, pointer closure);
+ 
+ #endif /* DIX_H */
+diff --git a/server/include/io.h b/server/include/io.h
+new file mode 100644
+index 0000000..16524c2
+--- /dev/null
++++ b/server/include/io.h
+@@ -0,0 +1,29 @@
++/***********************************************************
++Copyright 2022 by Petr Pisar.
++
++                        All Rights Reserved
++
++Permission to use, copy, modify, and distribute this software and its 
++documentation for any purpose and without fee is hereby granted, 
++provided that the above copyright notice appear in all copies and that
++both that copyright notice and this permission notice appear in 
++supporting documentation, and that the names of Digital or MIT not be
++used in advertising or publicity pertaining to distribution of the
++software without specific, written prior permission.  
++
++DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
++ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
++DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
++ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
++WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
++ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++SOFTWARE.
++
++******************************************************************/
++
++#ifndef IO_H
++#define IO_H
++#include "dix.h"
++#include "osdep.h"
++int FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount);
++#endif
+diff --git a/server/include/os.h b/server/include/os.h
+index f7084d5..e9e0e68 100644
+--- a/server/include/os.h
++++ b/server/include/os.h
+@@ -140,6 +140,8 @@ void ProcessCommandLine();
+ char *FindConfigFile();
+ void FlushAllOutput();
+ void FlushIfCriticalOutputPending();
++void OsInitAllocator(void);
++void AuditF();
+ #ifndef CAHILL_MALLOC
+ void Xfree(pointer ptr);
+ void *Xalloc(unsigned long size);
+diff --git a/server/os/access.c b/server/os/access.c
+index 6d10fda..06f1aad 100644
+--- a/server/os/access.c
++++ b/server/os/access.c
+@@ -54,6 +54,7 @@ SOFTWARE.
+ #include "misc.h"
+ #include "site.h"
+ #include <errno.h>
++#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+@@ -69,7 +70,7 @@ SOFTWARE.
+ #include <net/gen/tcp.h>
+ #include <net/gen/tcp_io.h>
+ #endif /* _MINIX */
+-#endif /* TCPCONN || ISC */
++#endif /* TCPCONN || ISC || USL */
+ #ifdef DNETCONN
+ #include <netdnet/dn.h>
+ #include <netdnet/dnetdb.h>
+@@ -85,23 +86,23 @@ SOFTWARE.
+ #  include <net/if.h>
+ # endif
+ #else
+-#if defined(SVR4) || defined(SYSV386) || defined(USE_FALLBACK_DEFINESELF)
+-# include <sys/utsname.h>
+-#endif
+-#if defined(SYSV) && defined(SYSV386)
+-# include <sys/stream.h>
+-# ifdef ISC
+-# include <sys/stropts.h>
+-# include <sys/sioctl.h>
+-# endif /* ISC */
+-#endif
+-#ifdef ESIX
+-# include <lan/if.h>
+-#else
+-#if !defined(AMOEBA) || !defined(_MINIX)
+-# include <net/if.h>
+-#endif
+-#endif
++# if defined(SVR4) || defined(SYSV386) || defined(USE_FALLBACK_DEFINESELF)
++#  include <sys/utsname.h>
++# endif
++# if defined(SYSV) && defined(SYSV386)
++#  include <sys/stream.h>
++#  ifdef ISC
++#   include <sys/stropts.h>
++#   include <sys/sioctl.h>
++#  endif /* ISC */
++# endif
++# ifdef ESIX
++#  include <lan/if.h>
++# else
++#  if !defined(AMOEBA) || !defined(_MINIX)
++#   include <net/if.h>
++#  endif
++# endif
+ #endif /* hpux */
+ 
+ #ifdef SVR4
+@@ -110,18 +111,18 @@ SOFTWARE.
+ #endif
+ 
+ #ifdef ESIX
+-#include <net/netdb.h>
+-#else
+-#ifdef AMOEBA
+-#include <server/ip/gen/netdb.h>
++# include <net/netdb.h>
+ #else
+-#ifndef _MINIX
+-#include <netdb.h>
+-#endif
+-#endif /* AMOEBA */
++# ifdef AMOEBA
++#  include <server/ip/gen/netdb.h>
++# else
++#  ifndef _MINIX
++#   include <netdb.h>
++#  endif
++# endif /* AMOEBA */
+ #endif /* ESIX */
++
+ #undef NULL
+-#include <stdio.h>
+ #include "dixstruct.h"
+ #include "osdep.h"
+ 
+@@ -208,6 +209,15 @@ static int AccessEnabled = DEFAULT_ACCESS_CONTROL;
+ static int LocalHostEnabled = FALSE;
+ static int UsingXdmcp = FALSE;
+ 
++static void
++AddLocalHosts(void)
++{
++    HOST *self;
++
++    for (self = selfhosts; self; self = self->next)
++        (void) NewHost(self->family, self->addr, self->len);
++}
++
+ /*
+  * called when authorization is not enabled to add the
+  * local host to the access list
+@@ -244,9 +254,10 @@ AccessUsingXdmcp(void)
+  */
+ /* SVR4, ISC, linux use this if SIOCGIFCONF fails */
+ #ifdef USE_FALLBACK_DEFINESELF
+-static
++static int
+ FallbackDefineSelf(fd)
+ #else
++int
+ DefineSelf(fd)
+ #endif
+ int fd;
+@@ -315,6 +326,7 @@ int fd;
+ /* Define this host for access control.  Find all the hosts the OS knows about 
+  * for this fd and add them to the selfhosts list.
+  */
++int
+ DefineSelf(fd)
+ int fd;
+ {
+@@ -398,6 +410,7 @@ int fd;
+ #else /* _MINIX */
+ /* Define this host for access control.
+  */
++int
+ DefineSelf(fd)
+ int fd;
+ {
+@@ -435,15 +448,8 @@ int fd;
+ #endif /* AMOEBA */
+ 
+ 
+-AddLocalHosts()
+-{
+-    HOST *self;
+-
+-    for (self = selfhosts; self; self = self->next)
+-        (void) NewHost(self->family, self->addr, self->len);
+-}
+-
+ /* Reset access control list to initial hosts */
++void
+ ResetHosts(display)
+ char *display;
+ {
+@@ -807,6 +813,7 @@ CheckAddr(int family, pointer pAddr, unsigned length)
+ /* Check if a host is not in the access control list. 
+  * Returns 1 if host is invalid, 0 if we've found it. */
+ 
++int
+ InvalidHost(saddr, len)
+ #ifdef AMOEBA
+ ipaddr_t *saddr;
+diff --git a/server/os/auth.c b/server/os/auth.c
+index 2aef275..a80a257 100644
+--- a/server/os/auth.c
++++ b/server/os/auth.c
+@@ -45,6 +45,7 @@
+ # include   <audio/audio.h>
+ # include   <X11/Xauth.h>
+ # include   "misc.h"
++# include   "access.h"
+ 
+ struct protocol {
+     unsigned short name_length;
+@@ -61,7 +62,8 @@ extern int MitAddCookie();
+ extern AuID MitCheckCookie();
+ extern int MitResetCookie();
+ extern AuID MitToID();
+-extern int MitFromID(), MitRemoveCookie();
++extern int MitFromID(AuID id, unsigned short *data_lenp, char **datap);
++extern int MitRemoveCookie(unsigned short data_length, char *data);
+ 
+ static struct protocol protocols[] = {
+     {(unsigned short) 18, "MIT-MAGIC-COOKIE-1",
+@@ -83,6 +85,7 @@ static char *authorization_file = (char *) NULL;
+ static int AuthorizationIndex = 0;
+ static Bool ShouldLoadAuth = TRUE;
+ 
++void
+ InitAuthorization(file_name)
+ char *file_name;
+ {
+@@ -148,7 +151,8 @@ char *data;
+     return (AuID) ~ 0L;
+ }
+ 
+-ResetAuthorization()
++void
++ResetAuthorization(void)
+ {
+     int i;
+ 
+@@ -175,6 +179,7 @@ char *data;
+     return (AuID) ~ 0L;
+ }
+ 
++int
+ AuthorizationFromID(id, name_lenp, namep, data_lenp, datap)
+ AuID id;
+ unsigned short *name_lenp;
+@@ -194,6 +199,7 @@ char **datap;
+     return 0;
+ }
+ 
++int
+ RemoveAuthorization(name_length, name, data_length, data)
+ unsigned short name_length;
+ char *name;
+@@ -211,6 +217,7 @@ char *data;
+     return 0;
+ }
+ 
++int
+ AddAuthorization(name_length, name, data_length, data)
+ unsigned short name_length;
+ char *name;
+diff --git a/server/os/connection.c b/server/os/connection.c
+index f87c9f0..b7049bc 100644
+--- a/server/os/connection.c
++++ b/server/os/connection.c
+@@ -154,6 +154,9 @@ static int unixDomainConnection = -1;
+ #if !defined(AMOEBA) && !defined(_MINIX)
+ #include <sys/uio.h>
+ #endif
++#include "access.h"
++#include "auth.h"
++#include "io.h"
+ #include "os.h"
+ #include "osdep.h"
+ #include "opaque.h"
+@@ -316,7 +319,7 @@ extern ClientPtr NextAvailableClient();
+ extern SIGVAL AutoResetServer();
+ extern SIGVAL GiveUp();
+ extern AuID CheckAuthorization();
+-#ifndef AMOEBA
++#ifndef _MINIX
+ static void CloseDownFileDescriptor(), ErrorConnMax();
+ #endif
+ extern void FreeOsBuffers(), ResetOsBuffers();
+@@ -1733,7 +1736,7 @@ ClientPtr client;
+         AuditF("client %d disconnected\n", client->index);
+ }
+ 
+-
++void
+ AddEnabledDevice(fd)
+ int fd;
+ {
+@@ -1741,7 +1744,7 @@ int fd;
+     BITSET(AllSockets, fd);
+ }
+ 
+-
++void
+ RemoveEnabledDevice(fd)
+ int fd;
+ {
+@@ -1759,6 +1762,7 @@ int fd;
+  *    This routine is "undone" by ListenToAllClients()
+  *****************/
+ 
++void
+ OnlyListenToOneClient(client)
+ ClientPtr client;
+ {
+@@ -1789,6 +1793,7 @@ ClientPtr client;
+  *    Undoes OnlyListentToOneClient()
+  ****************/
+ 
++void
+ ListenToAllClients()
+ {
+     if (GrabInProgress) {
+@@ -1801,6 +1806,7 @@ ListenToAllClients()
+ 
+ /* make client impervious to grabs; assume only executing client calls this */
+ 
++void
+ MakeClientGrabImpervious(client)
+ ClientPtr client;
+ {
+@@ -1812,6 +1818,7 @@ ClientPtr client;
+ 
+ /* make client pervious to grabs; assume only executing client calls this */
+ 
++void
+ MakeClientGrabPervious(client)
+ ClientPtr client;
+ {
+@@ -1974,6 +1981,7 @@ CloseDownFileDescriptor(OsCommPtr oc)
+     xfree(oc);
+ }
+ 
++void
+ CloseDownConnection(client)
+ ClientPtr client;
+ {
+@@ -1989,18 +1997,21 @@ ClientPtr client;
+     client->osPrivate = (pointer) NULL;
+ }
+ 
++void
+ AddEnabledDevice(fd)
+ int fd;
+ {
+     ASIO_FD_SET(fd, ASIO_READ, &InprogressFdSet);
+ }
+ 
++void
+ RemoveEnabledDevice(fd)
+ int fd;
+ {
+     ASIO_FD_CLR(fd, ASIO_READ, &InprogressFdSet);
+ }
+ 
++void
+ OnlyListenToOneClient(client)
+ ClientPtr client;
+ {
+@@ -2014,6 +2025,7 @@ ClientPtr client;
+     }
+ }
+ 
++void
+ ListenToAllClients()
+ {
+     if (GrabInProgress) {
+@@ -2312,6 +2324,7 @@ pointer closure;
+ 
+ #define NOROOM "Maximum number of clients reached"
+ 
++void
+ OnlyListenToOneClient(client)
+ ClientPtr client;
+ {
+@@ -2322,6 +2335,7 @@ ClientPtr client;
+         grabClient = client;
+ }
+ 
++void
+ CloseDownConnection(client)
+ ClientPtr client;
+ {
+@@ -2339,18 +2353,21 @@ ClientPtr client;
+     client->osPrivate = (pointer) NULL;
+ }
+ 
++void
+ ListenToAllClients()
+ {
+     grabClient = NULL;
+ }
+ 
+ /* These two are dummies -- and are never called at run-time */
++void
+ AddEnabledDevice(fd)
+ int fd;
+ {
+     return;
+ }
+ 
++void
+ RemoveEnabledDevice(fd)
+ int fd;
+ {
+diff --git a/server/os/daemon.c b/server/os/daemon.c
+index 9a92b88..187fd9b 100644
+--- a/server/os/daemon.c
++++ b/server/os/daemon.c
+@@ -36,6 +36,7 @@ from the X Consortium.
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ 
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -60,6 +61,9 @@ from the X Consortium.
+ #endif
+ 
+ #include "os.h"
++#if defined(linux) || defined(CSRG_BASED) || defined(__QNXNTO__)
++#include "aulog.h"
++#endif
+ 
+ void
+ osBecomeOrphan(void)
+diff --git a/server/os/io.c b/server/os/io.c
+index b607da3..8def950 100644
+--- a/server/os/io.c
++++ b/server/os/io.c
+@@ -369,7 +369,7 @@ int count;
+  *    Reset to reexecute the current request, and yield.
+  *
+  **********************/
+-
++void
+ ResetCurrentRequest(client)
+ ClientPtr client;
+ {
+@@ -966,6 +966,7 @@ int count;
+     return TRUE;
+ }
+ 
++void
+ ResetCurrentRequest(client)
+ ClientPtr client;
+ {
+diff --git a/server/os/mitauth.c b/server/os/mitauth.c
+index f1039b7..891bd3f 100644
+--- a/server/os/mitauth.c
++++ b/server/os/mitauth.c
+@@ -119,6 +119,7 @@ char *data;
+     return (AuID) - 1;
+ }
+ 
++int
+ MitFromID(id, data_lenp, datap)
+ AuID id;
+ unsigned short *data_lenp;
+@@ -136,6 +137,7 @@ char **datap;
+     return 0;
+ }
+ 
++int
+ MitRemoveCookie(data_length, data)
+ unsigned short data_length;
+ char *data;
+diff --git a/server/os/osdep.h b/server/os/osdep.h
+index 27ce620..bbbd0d3 100644
+--- a/server/os/osdep.h
++++ b/server/os/osdep.h
+@@ -47,6 +47,9 @@ SOFTWARE.
+ 
+ ******************************************************************/
+ 
++#ifndef OSDEP_H
++#define OSDEP_H
++
+ #ifdef AMOEBA
+ #include <stddef.h>
+ #include <amoeba.h>
+@@ -306,3 +309,5 @@ extern int nNewConns;           /* # of new clients */
+ 
+ extern semaphore init_sema;     /* Initialize semaphore */
+ #endif /* AMOEBA */
++
++#endif /* ndef OSDEP_H */
+-- 
+2.39.1
+

diff --git a/media-libs/nas/nas-1.9.5-r1.ebuild b/media-libs/nas/nas-1.9.5-r1.ebuild
new file mode 100644
index 000000000000..8e1276acd78a
--- /dev/null
+++ b/media-libs/nas/nas-1.9.5-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib multilib-minimal toolchain-funcs
+
+DESCRIPTION="Network Audio System"
+HOMEPAGE="https://radscan.com/nas.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="HPND MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+	x11-libs/libICE
+	x11-libs/libSM
+	x11-libs/libX11
+	x11-libs/libXau[${MULTILIB_USEDEP}]
+	x11-libs/libXaw
+	x11-libs/libXext
+	x11-libs/libXmu
+	x11-libs/libXpm
+	x11-libs/libXt[${MULTILIB_USEDEP}]"
+DEPEND="
+	${RDEPEND}
+	x11-base/xorg-proto"
+BDEPEND="
+	app-text/rman
+	app-alternatives/yacc
+	app-alternatives/lex
+	sys-devel/gcc
+	x11-misc/gccmakedep
+	riscv? ( x11-misc/xorg-cf-files )
+	>=x11-misc/imake-1.0.8-r1"
+
+DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.9.2-asneeded.patch"
+	"${FILESDIR}/${PN}-1.9.4-libfl.patch"
+	# Applied upstream
+	"${FILESDIR}"/nas-1.9.5-No-implicit-ints-and-function-declarations.patch
+	"${FILESDIR}"/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch
+)
+
+src_prepare() {
+	default
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	# Need to run econf so that config.guess is updated
+	pushd config || die
+	econf
+	popd || die
+
+	local cpp=($(get_abi_CHOST ${DEFAULT_ABI})-gcc $(get_abi_CFLAGS) -E) #884203
+	CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" \
+		IMAKECPP="${IMAKECPP:-${cpp[*]}}" \
+		xmkmf -a || die
+}
+
+multilib_src_compile() {
+	# EXTRA_LDOPTIONS, SHLIBGLOBALSFLAGS #336564#c2
+	local emakeopts=(
+		AR="$(tc-getAR) cq"
+		AS="$(tc-getAS)"
+		CC="$(tc-getCC)"
+		CDEBUGFLAGS="${CFLAGS}"
+		CXX="$(tc-getCXX)"
+		CXXDEBUFLAGS="${CXXFLAGS}"
+		EXTRA_LDOPTIONS="${LDFLAGS}"
+		LD="$(tc-getLD)"
+		MAKE="${MAKE:-gmake}"
+		RANLIB="$(tc-getRANLIB)"
+		SHLIBGLOBALSFLAGS="${LDFLAGS}"
+		WORLDOPTS=
+	)
+
+	if multilib_is_native_abi ; then
+		# dumb fix for parallel make issue wrt #446598, Imake sux
+		emake "${emakeopts[@]}" -C server/dia all
+		emake "${emakeopts[@]}" -C server/dda/voxware all
+		emake "${emakeopts[@]}" -C server/os all
+	else
+		sed -i \
+			-e 's/SUBDIRS =.*/SUBDIRS = include lib config/' \
+			Makefile || die
+	fi
+
+	emake "${emakeopts[@]}"
+}
+
+multilib_src_install() {
+	# ranlib is used at install phase too wrt #446600
+	emake RANLIB="$(tc-getRANLIB)" \
+		DESTDIR="${D}" USRLIBDIR=/usr/$(get_libdir) \
+		install install.man
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	if use doc; then
+		docinto doc
+		dodoc doc/{actions,protocol.txt,README}
+		docinto pdf
+		dodoc doc/pdf/*.pdf
+	fi
+
+	mv -vf "${D}"/etc/nas/nasd.conf{.eg,} || die
+
+	newconfd "${FILESDIR}"/nas.conf.d nas
+	newinitd "${FILESDIR}"/nas.init.d nas
+
+	if ! use static-libs; then
+		rm -f "${D}"/usr/lib*/libaudio.a || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/
@ 2024-03-20  6:26 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-03-20  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     7818f58b4434cc9365e5ed88197a867cba381000
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 20 06:25:51 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:25:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7818f58b

media-libs/nas: move patches to devspace

Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/nas/Manifest                            |   1 +
 ...as-1.9.5-Correct-pointer-types-for-GCC-14.patch | 108 ---
 ...o-implicit-ints-and-function-declarations.patch | 834 ---------------------
 media-libs/nas/nas-1.9.5-r1.ebuild                 |   7 +-
 4 files changed, 3 insertions(+), 947 deletions(-)

diff --git a/media-libs/nas/Manifest b/media-libs/nas/Manifest
index 350414fb2ed0..e2f9dc3ff219 100644
--- a/media-libs/nas/Manifest
+++ b/media-libs/nas/Manifest
@@ -1 +1,2 @@
+DIST nas-1.9.5-patches.tar.xz 7788 BLAKE2B 54172eba6547b0890cdef7b87a38b7d85bf05ffbec2d459da6b66b48ce7e627a9c7a4c4d4550729d0c4acd3de99a0299d57d2cc75ecea74f745764f284a9d0e7 SHA512 dce3e68c3018aa0553b4c48baa66e37db4db54ed33aad388902e2b05c9dcc6e696b69b1c00f9adbcfddcd262ed65758ea5897a13856315edd522297814df0899
 DIST nas-1.9.5.tar.gz 1170144 BLAKE2B 81b063f888d66534f8779d6b0534397ada703868ff711c49b998fbf56bc6e4313fa245b6168fe9913936afa0685bab595df24f9f4bd5663dfa560c4b64534466 SHA512 051b32593e7ace09cf2d12720fb80e38d4f83f36858debacfb828c759e98b3e29401c76e3e3770f57fbbd1750a84b17a18e712f0de3dbe0ff56f2505c2488d9a

diff --git a/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch b/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch
deleted file mode 100644
index 1ed7dae2d48c..000000000000
--- a/media-libs/nas/files/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From cffa7bbc124f775520914a0cfb0ede619a05e07d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
-Date: Fri, 2 Feb 2024 16:05:11 +0100
-Subject: [PATCH] Correct pointer types for GCC 14
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GCC 14 became pickier about pointer types:
-
-auth.c:71:26: error: initialization of ‘int (*)()’ from incompatible pointer type ‘int (*)(short unsigned int,  char *)’ [-Wincompatible-pointer-types]
-   71 |      MitToID, MitFromID, MitRemoveCookie,
-      |                          ^~~~~~~~~~~~~~~
-
-Including const correctness:
-
-audemo.c: In function ‘rescanCB’:
-audemo.c:524:23: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
-  524 |                       makeFileList(globals->fileNames, globals->numFiles),
-      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      |                       |
-      |                       char **
-
-This patch fixes these errors.
-
-Signed-off-by: Petr Písař <ppisar@redhat.com>
----
- clients/audio/audemo/audemo.c | 28 ++++++++++++++--------------
- server/os/auth.c              |  2 +-
- 2 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/clients/audio/audemo/audemo.c b/clients/audio/audemo/audemo.c
-index 5617cf7..e77b95d 100644
---- a/clients/audio/audemo/audemo.c
-+++ b/clients/audio/audemo/audemo.c
-@@ -500,11 +500,11 @@ newBucketCB(Widget w, XtPointer globalsp, XtPointer call_data)
- static void
- rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
- {
--    GlobalDataPtr   globals = (GlobalDataPtr) globalsp;
--    static char    *noFilesString = "No files found";
--    char           *dir,
--                   *template;
--    int             i;
-+    GlobalDataPtr       globals = (GlobalDataPtr) globalsp;
-+    static const char   *noFilesString = "No files found";
-+    char                *dir,
-+                        *template;
-+    int                 i;
- 
-     if (globals->numFiles)
-     {
-@@ -521,7 +521,7 @@ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
-     if (globals->numFiles)
-     {
- 	XawListChange(globals->samples,
--		      makeFileList(globals->fileNames, globals->numFiles),
-+		      (const char **)makeFileList(globals->fileNames, globals->numFiles),
- 		      globals->numFiles, -1, True);
- 	XtSetSensitive(globals->samples, True);
-     }
-@@ -591,13 +591,13 @@ bucketPlayCB(Widget w, XtPointer globalsp, XtPointer call_data)
- static void
- bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
- {
--    GlobalDataPtr   globals = (GlobalDataPtr) globalsp;
-+    GlobalDataPtr       globals = (GlobalDataPtr) globalsp;
-     BucketDialogDataPtr buf = &globals->buf;
--    char            tmp[200],
--                    access[4],
--                    desc[COMMENT_LEN];
--    int             i;
--    static char    *noBucketString = "No buckets";
-+    char                tmp[200],
-+                        access[4],
-+			desc[COMMENT_LEN];
-+    int                 i;
-+    static const char  *noBucketString = "No buckets";
- 
-     if (buf->numBuckets)
-     {
-@@ -652,8 +652,8 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
- 
-     if (buf->numBuckets)
-     {
--	XawListChange(buf->bucketList, buf->bucketText, buf->numBuckets, -1,
--		      True);
-+	XawListChange(buf->bucketList, (const char **)buf->bucketText,
-+	              buf->numBuckets, -1, True);
- 	XtSetSensitive(buf->bucketList, True);
-     }
-     else
-diff --git a/server/os/auth.c b/server/os/auth.c
-index a80a257..9488db7 100644
---- a/server/os/auth.c
-+++ b/server/os/auth.c
-@@ -55,7 +55,7 @@ struct protocol {
-     int (*Reset) ();            /* delete all authorization data entries */
-         AuID(*ToID) ();         /* convert cookie to ID */
-     int (*FromID) ();           /* convert ID to cookie */
--    int (*Remove) ();           /* remove a specific cookie */
-+    int (*Remove) (unsigned short, char *);     /* remove a specific cookie */
- };
- 
- extern int MitAddCookie();
--- 
-2.43.0
-

diff --git a/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch b/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch
deleted file mode 100644
index a3a7e50efdec..000000000000
--- a/media-libs/nas/files/nas-1.9.5-No-implicit-ints-and-function-declarations.patch
+++ /dev/null
@@ -1,834 +0,0 @@
-From 0e08ed6753a547637a39ede05a006d9b730647df Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
-Date: Tue, 22 Nov 2022 13:11:26 +0100
-Subject: [PATCH] No implicit ints and function declarations
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GCC 13 or 14 is going to remove some old and by C99 standard obsolete
-features, like implicit int types and implicit function declararations,
-from an implicit gnu18 compilator standard. The compiler will report
-an error instead:
-
-conftest.c:62:1: error: type defaults to 'int' in declaration of 'main'
-   62 | main()
-      | ^~~~
-conftest.c:65:3: error: implicit declaration of function 'exit'
-   65 |   exit(0);
-      |   ^~~~
-
-This patch adjusts the code to remain compilable. For some functions,
-it fixes their return type from int to void. Few functions which
-apparantly are internal to a compilatation unit were made static.
-_AuSendClientPrefix() was declared in a public header.
-
-Tested with an instrumented GCC 13.0.1.
-
-<https://fedoraproject.org/wiki/Changes/PortingToModernC>
-
-Signed-off-by: Petr Písař <ppisar@redhat.com>
----
- clients/audio/auctl/execute.c     |  1 +
- clients/audio/auplay/auplay.c     |  1 +
- clients/audio/examples/playFile.c |  1 +
- config/configure.ac               |  5 +-
- config/filelist                   |  3 ++
- lib/audio/Alibint.h               |  8 ++++
- lib/audio/ConnSvr.c               |  3 ++
- server/dda/voxware/auvoxware.c    |  3 +-
- server/dda/voxware/config.c       |  2 +
- server/dia/au.h                   |  2 +
- server/dia/gram.y                 |  1 +
- server/include/access.h           | 36 ++++++++++++++
- server/include/auth.h             | 27 +++++++++++
- server/include/dix.h              |  6 ++-
- server/include/io.h               | 29 ++++++++++++
- server/include/os.h               |  2 +
- server/os/access.c                | 79 +++++++++++++++++--------------
- server/os/auth.c                  | 11 ++++-
- server/os/connection.c            | 23 +++++++--
- server/os/daemon.c                |  4 ++
- server/os/io.c                    |  3 +-
- server/os/mitauth.c               |  2 +
- server/os/osdep.h                 |  5 ++
- 23 files changed, 211 insertions(+), 46 deletions(-)
- create mode 100644 server/include/access.h
- create mode 100644 server/include/auth.h
- create mode 100644 server/include/io.h
-
-diff --git a/clients/audio/auctl/execute.c b/clients/audio/auctl/execute.c
-index 12f7c05..fd7a937 100644
---- a/clients/audio/auctl/execute.c
-+++ b/clients/audio/auctl/execute.c
-@@ -22,6 +22,7 @@
-  * $NCDId: @(#)execute.c,v 1.7 1994/04/07 18:10:33 greg Exp $
-  */
- 
-+#include <stdlib.h>
- #include "auctl.h"
- 
- static int _execute_set PROTO((AuServer *, int, char **));
-diff --git a/clients/audio/auplay/auplay.c b/clients/audio/auplay/auplay.c
-index 4037a64..c9d880e 100644
---- a/clients/audio/auplay/auplay.c
-+++ b/clients/audio/auplay/auplay.c
-@@ -146,6 +146,7 @@ do_file(char *fname)
- 	fprintf(stderr, "Couldn't play file \"%s\"\n", fname);
- }
- 
-+int
- main(int argc, char **argv)
- {
-     int             i,
-diff --git a/clients/audio/examples/playFile.c b/clients/audio/examples/playFile.c
-index 646077e..e8828a8 100644
---- a/clients/audio/examples/playFile.c
-+++ b/clients/audio/examples/playFile.c
-@@ -13,6 +13,7 @@
- #include <audio/audiolib.h>
- #include <audio/soundlib.h>
- 
-+int
- main(int argc, char **argv)
- {
-     char           *file = argv[1];
-diff --git a/config/configure.ac b/config/configure.ac
-index d99bedb..e57c27e 100644
---- a/config/configure.ac
-+++ b/config/configure.ac
-@@ -65,11 +65,12 @@ dnl check for sys_errlist decl
- 
- AC_MSG_CHECKING(for sys_errlist declaration)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <stdio.h>
--
- #include <errno.h>
--main()
-+int
-+main(void)
- {
-   char *s = sys_errlist[0];
-   exit(0);
-diff --git a/config/filelist b/config/filelist
-index 9e89dc5..ed1149f 100644
---- a/config/filelist
-+++ b/config/filelist
-@@ -601,9 +601,12 @@
- ./server/dia/swapreq.c
- ./server/dia/tables.c
- ./server/dia
-+./server/include/access.h
-+./server/include/auth.h
- ./server/include/site.h
- ./server/include/dix.h
- ./server/include/dixstruct.h
-+./server/include/io.h
- ./server/include/misc.h
- ./server/include/opaque.h
- ./server/include/os.h
-diff --git a/lib/audio/Alibint.h b/lib/audio/Alibint.h
-index ce554c8..254a37c 100644
---- a/lib/audio/Alibint.h
-+++ b/lib/audio/Alibint.h
-@@ -683,6 +683,14 @@ _AuDisconnectServer(
-     int				/* server */
- );
- 
-+extern AuBool
-+_AuSendClientPrefix (
-+     AuServer *aud,
-+     auConnClientPrefix *client,    /* contains count for auth_* */
-+     char *auth_proto,
-+     char *auth_string  /* NOT null-terminated */
-+);
-+
- void
- _AuFreeServerStructure(
-     AuServer  *			/* aud */
-diff --git a/lib/audio/ConnSvr.c b/lib/audio/ConnSvr.c
-index e71bfee..4ea73b1 100644
---- a/lib/audio/ConnSvr.c
-+++ b/lib/audio/ConnSvr.c
-@@ -75,6 +75,9 @@
- # endif
- # include <sys/stropts.h>
- #endif
-+#ifdef TCPCONN
-+#include <arpa/inet.h>          /* for inet_addr() */
-+#endif
- 
- #ifdef STREAMSCONN
- #define select _AuSelect
-diff --git a/server/dda/voxware/auvoxware.c b/server/dda/voxware/auvoxware.c
-index 391514a..851db18 100644
---- a/server/dda/voxware/auvoxware.c
-+++ b/server/dda/voxware/auvoxware.c
-@@ -133,6 +133,7 @@ PERFORMANCE OF THIS SOFTWARE.
- 
- #include <stdio.h>
- #include <stdlib.h>
-+#include <unistd.h>
- #ifndef SVR4
- #include <getopt.h>
- #endif
-@@ -168,6 +169,7 @@ static int debug_msg_indentation = 0;
- #include "dixstruct.h"          /* for RESTYPE */
- #include "os.h"                 /* for xalloc/xfree and NULL */
- #include <fcntl.h>
-+#include <sys/ioctl.h>
- #include <sys/time.h>
- #include <sys/param.h>
- #include <assert.h>
-@@ -186,7 +188,6 @@ static int debug_msg_indentation = 0;
- # include <machine/pcaudioio.h>
- #else
- # ifdef __NetBSD__
--#  include <sys/ioctl.h>
- #  include <soundcard.h>
- # else
- #  include <sys/soundcard.h>
-diff --git a/server/dda/voxware/config.c b/server/dda/voxware/config.c
-index 40aae46..a02e2f5 100644
---- a/server/dda/voxware/config.c
-+++ b/server/dda/voxware/config.c
-@@ -5,6 +5,8 @@
-  */
- 
- #include <fcntl.h>
-+#include <string.h>
-+#include "os.h"
- #include "nasconf.h"
- #include "config.h"
- #include "aulog.h"
-diff --git a/server/dia/au.h b/server/dia/au.h
-index 47dbf8d..b1de3d4 100644
---- a/server/dia/au.h
-+++ b/server/dia/au.h
-@@ -409,6 +409,8 @@ _pFunc AuCallbacks[AuMaxCB];
-         (*AuCallbacks[_n]) _args
- 
- #ifndef WAKEUP_SERVER
-+#include <signal.h>
-+#include <unistd.h>
- #define WAKEUP_SERVER()         kill(getpid(), SIGUSR1)
- #endif /* !WAKEUP_SERVER */
- 
-diff --git a/server/dia/gram.y b/server/dia/gram.y
-index 50b40c7..4757de3 100644
---- a/server/dia/gram.y
-+++ b/server/dia/gram.y
-@@ -16,6 +16,7 @@
- static char     *ptr;
- static void RemoveDQuote(char *str);
- static long parsebool(char *str);
-+extern int yylex (void);
- extern int yylineno;
- void yyerror(char *s);
- 
-diff --git a/server/include/access.h b/server/include/access.h
-new file mode 100644
-index 0000000..35a1496
---- /dev/null
-+++ b/server/include/access.h
-@@ -0,0 +1,36 @@
-+/***********************************************************
-+Copyright 2022 by Petr Pisar.
-+
-+                        All Rights Reserved
-+
-+Permission to use, copy, modify, and distribute this software and its 
-+documentation for any purpose and without fee is hereby granted, 
-+provided that the above copyright notice appear in all copies and that
-+both that copyright notice and this permission notice appear in 
-+supporting documentation, and that the names of Digital or MIT not be
-+used in advertising or publicity pertaining to distribution of the
-+software without specific, written prior permission.  
-+
-+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+SOFTWARE.
-+
-+******************************************************************/
-+
-+#ifndef ACCESS_H
-+#define ACCESS_H
-+int DefineSelf(int fd);
-+void EnableLocalHost(void);
-+void ResetHosts(char *display);
-+
-+#ifdef AMOEBA
-+int InvalidHost(ipaddr_t *saddr, int len);
-+#else
-+int InvalidHost(struct sockaddr *saddr, int len);
-+#endif
-+
-+#endif
-diff --git a/server/include/auth.h b/server/include/auth.h
-new file mode 100644
-index 0000000..24c4ce5
---- /dev/null
-+++ b/server/include/auth.h
-@@ -0,0 +1,27 @@
-+/***********************************************************
-+Copyright 2022 by Petr Pisar.
-+
-+                        All Rights Reserved
-+
-+Permission to use, copy, modify, and distribute this software and its 
-+documentation for any purpose and without fee is hereby granted, 
-+provided that the above copyright notice appear in all copies and that
-+both that copyright notice and this permission notice appear in 
-+supporting documentation, and that the names of Digital or MIT not be
-+used in advertising or publicity pertaining to distribution of the
-+software without specific, written prior permission.  
-+
-+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+SOFTWARE.
-+
-+******************************************************************/
-+
-+#ifndef AUTH_H
-+#define AUTH_H
-+void ResetAuthorization(void);
-+#endif
-diff --git a/server/include/dix.h b/server/include/dix.h
-index 27e85a4..bceddf6 100644
---- a/server/include/dix.h
-+++ b/server/include/dix.h
-@@ -26,6 +26,8 @@ SOFTWARE.
- #ifndef DIX_H
- #define DIX_H
- 
-+#include "misc.h"   /* for pointer typedef */
-+
- #define EARLIER -1
- #define SAMETIME 0
- #define LATER 1
-@@ -84,6 +86,8 @@ extern ClientPtr serverClient;
- extern int currentMaxClients;
- extern long *checkForInput[2];
- 
--extern void NoopDDA(pointer, AuID);
-+extern void NoopDDA(pointer value, AuID id);
-+extern void ProcessWorkQueue(void);
-+extern Bool QueueWorkProc(Bool(*function)(void), ClientPtr client, pointer closure);
- 
- #endif /* DIX_H */
-diff --git a/server/include/io.h b/server/include/io.h
-new file mode 100644
-index 0000000..16524c2
---- /dev/null
-+++ b/server/include/io.h
-@@ -0,0 +1,29 @@
-+/***********************************************************
-+Copyright 2022 by Petr Pisar.
-+
-+                        All Rights Reserved
-+
-+Permission to use, copy, modify, and distribute this software and its 
-+documentation for any purpose and without fee is hereby granted, 
-+provided that the above copyright notice appear in all copies and that
-+both that copyright notice and this permission notice appear in 
-+supporting documentation, and that the names of Digital or MIT not be
-+used in advertising or publicity pertaining to distribution of the
-+software without specific, written prior permission.  
-+
-+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+SOFTWARE.
-+
-+******************************************************************/
-+
-+#ifndef IO_H
-+#define IO_H
-+#include "dix.h"
-+#include "osdep.h"
-+int FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount);
-+#endif
-diff --git a/server/include/os.h b/server/include/os.h
-index f7084d5..e9e0e68 100644
---- a/server/include/os.h
-+++ b/server/include/os.h
-@@ -140,6 +140,8 @@ void ProcessCommandLine();
- char *FindConfigFile();
- void FlushAllOutput();
- void FlushIfCriticalOutputPending();
-+void OsInitAllocator(void);
-+void AuditF();
- #ifndef CAHILL_MALLOC
- void Xfree(pointer ptr);
- void *Xalloc(unsigned long size);
-diff --git a/server/os/access.c b/server/os/access.c
-index 6d10fda..06f1aad 100644
---- a/server/os/access.c
-+++ b/server/os/access.c
-@@ -54,6 +54,7 @@ SOFTWARE.
- #include "misc.h"
- #include "site.h"
- #include <errno.h>
-+#include <stdio.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/ioctl.h>
-@@ -69,7 +70,7 @@ SOFTWARE.
- #include <net/gen/tcp.h>
- #include <net/gen/tcp_io.h>
- #endif /* _MINIX */
--#endif /* TCPCONN || ISC */
-+#endif /* TCPCONN || ISC || USL */
- #ifdef DNETCONN
- #include <netdnet/dn.h>
- #include <netdnet/dnetdb.h>
-@@ -85,23 +86,23 @@ SOFTWARE.
- #  include <net/if.h>
- # endif
- #else
--#if defined(SVR4) || defined(SYSV386) || defined(USE_FALLBACK_DEFINESELF)
--# include <sys/utsname.h>
--#endif
--#if defined(SYSV) && defined(SYSV386)
--# include <sys/stream.h>
--# ifdef ISC
--# include <sys/stropts.h>
--# include <sys/sioctl.h>
--# endif /* ISC */
--#endif
--#ifdef ESIX
--# include <lan/if.h>
--#else
--#if !defined(AMOEBA) || !defined(_MINIX)
--# include <net/if.h>
--#endif
--#endif
-+# if defined(SVR4) || defined(SYSV386) || defined(USE_FALLBACK_DEFINESELF)
-+#  include <sys/utsname.h>
-+# endif
-+# if defined(SYSV) && defined(SYSV386)
-+#  include <sys/stream.h>
-+#  ifdef ISC
-+#   include <sys/stropts.h>
-+#   include <sys/sioctl.h>
-+#  endif /* ISC */
-+# endif
-+# ifdef ESIX
-+#  include <lan/if.h>
-+# else
-+#  if !defined(AMOEBA) || !defined(_MINIX)
-+#   include <net/if.h>
-+#  endif
-+# endif
- #endif /* hpux */
- 
- #ifdef SVR4
-@@ -110,18 +111,18 @@ SOFTWARE.
- #endif
- 
- #ifdef ESIX
--#include <net/netdb.h>
--#else
--#ifdef AMOEBA
--#include <server/ip/gen/netdb.h>
-+# include <net/netdb.h>
- #else
--#ifndef _MINIX
--#include <netdb.h>
--#endif
--#endif /* AMOEBA */
-+# ifdef AMOEBA
-+#  include <server/ip/gen/netdb.h>
-+# else
-+#  ifndef _MINIX
-+#   include <netdb.h>
-+#  endif
-+# endif /* AMOEBA */
- #endif /* ESIX */
-+
- #undef NULL
--#include <stdio.h>
- #include "dixstruct.h"
- #include "osdep.h"
- 
-@@ -208,6 +209,15 @@ static int AccessEnabled = DEFAULT_ACCESS_CONTROL;
- static int LocalHostEnabled = FALSE;
- static int UsingXdmcp = FALSE;
- 
-+static void
-+AddLocalHosts(void)
-+{
-+    HOST *self;
-+
-+    for (self = selfhosts; self; self = self->next)
-+        (void) NewHost(self->family, self->addr, self->len);
-+}
-+
- /*
-  * called when authorization is not enabled to add the
-  * local host to the access list
-@@ -244,9 +254,10 @@ AccessUsingXdmcp(void)
-  */
- /* SVR4, ISC, linux use this if SIOCGIFCONF fails */
- #ifdef USE_FALLBACK_DEFINESELF
--static
-+static int
- FallbackDefineSelf(fd)
- #else
-+int
- DefineSelf(fd)
- #endif
- int fd;
-@@ -315,6 +326,7 @@ int fd;
- /* Define this host for access control.  Find all the hosts the OS knows about 
-  * for this fd and add them to the selfhosts list.
-  */
-+int
- DefineSelf(fd)
- int fd;
- {
-@@ -398,6 +410,7 @@ int fd;
- #else /* _MINIX */
- /* Define this host for access control.
-  */
-+int
- DefineSelf(fd)
- int fd;
- {
-@@ -435,15 +448,8 @@ int fd;
- #endif /* AMOEBA */
- 
- 
--AddLocalHosts()
--{
--    HOST *self;
--
--    for (self = selfhosts; self; self = self->next)
--        (void) NewHost(self->family, self->addr, self->len);
--}
--
- /* Reset access control list to initial hosts */
-+void
- ResetHosts(display)
- char *display;
- {
-@@ -807,6 +813,7 @@ CheckAddr(int family, pointer pAddr, unsigned length)
- /* Check if a host is not in the access control list. 
-  * Returns 1 if host is invalid, 0 if we've found it. */
- 
-+int
- InvalidHost(saddr, len)
- #ifdef AMOEBA
- ipaddr_t *saddr;
-diff --git a/server/os/auth.c b/server/os/auth.c
-index 2aef275..a80a257 100644
---- a/server/os/auth.c
-+++ b/server/os/auth.c
-@@ -45,6 +45,7 @@
- # include   <audio/audio.h>
- # include   <X11/Xauth.h>
- # include   "misc.h"
-+# include   "access.h"
- 
- struct protocol {
-     unsigned short name_length;
-@@ -61,7 +62,8 @@ extern int MitAddCookie();
- extern AuID MitCheckCookie();
- extern int MitResetCookie();
- extern AuID MitToID();
--extern int MitFromID(), MitRemoveCookie();
-+extern int MitFromID(AuID id, unsigned short *data_lenp, char **datap);
-+extern int MitRemoveCookie(unsigned short data_length, char *data);
- 
- static struct protocol protocols[] = {
-     {(unsigned short) 18, "MIT-MAGIC-COOKIE-1",
-@@ -83,6 +85,7 @@ static char *authorization_file = (char *) NULL;
- static int AuthorizationIndex = 0;
- static Bool ShouldLoadAuth = TRUE;
- 
-+void
- InitAuthorization(file_name)
- char *file_name;
- {
-@@ -148,7 +151,8 @@ char *data;
-     return (AuID) ~ 0L;
- }
- 
--ResetAuthorization()
-+void
-+ResetAuthorization(void)
- {
-     int i;
- 
-@@ -175,6 +179,7 @@ char *data;
-     return (AuID) ~ 0L;
- }
- 
-+int
- AuthorizationFromID(id, name_lenp, namep, data_lenp, datap)
- AuID id;
- unsigned short *name_lenp;
-@@ -194,6 +199,7 @@ char **datap;
-     return 0;
- }
- 
-+int
- RemoveAuthorization(name_length, name, data_length, data)
- unsigned short name_length;
- char *name;
-@@ -211,6 +217,7 @@ char *data;
-     return 0;
- }
- 
-+int
- AddAuthorization(name_length, name, data_length, data)
- unsigned short name_length;
- char *name;
-diff --git a/server/os/connection.c b/server/os/connection.c
-index f87c9f0..b7049bc 100644
---- a/server/os/connection.c
-+++ b/server/os/connection.c
-@@ -154,6 +154,9 @@ static int unixDomainConnection = -1;
- #if !defined(AMOEBA) && !defined(_MINIX)
- #include <sys/uio.h>
- #endif
-+#include "access.h"
-+#include "auth.h"
-+#include "io.h"
- #include "os.h"
- #include "osdep.h"
- #include "opaque.h"
-@@ -316,7 +319,7 @@ extern ClientPtr NextAvailableClient();
- extern SIGVAL AutoResetServer();
- extern SIGVAL GiveUp();
- extern AuID CheckAuthorization();
--#ifndef AMOEBA
-+#ifndef _MINIX
- static void CloseDownFileDescriptor(), ErrorConnMax();
- #endif
- extern void FreeOsBuffers(), ResetOsBuffers();
-@@ -1733,7 +1736,7 @@ ClientPtr client;
-         AuditF("client %d disconnected\n", client->index);
- }
- 
--
-+void
- AddEnabledDevice(fd)
- int fd;
- {
-@@ -1741,7 +1744,7 @@ int fd;
-     BITSET(AllSockets, fd);
- }
- 
--
-+void
- RemoveEnabledDevice(fd)
- int fd;
- {
-@@ -1759,6 +1762,7 @@ int fd;
-  *    This routine is "undone" by ListenToAllClients()
-  *****************/
- 
-+void
- OnlyListenToOneClient(client)
- ClientPtr client;
- {
-@@ -1789,6 +1793,7 @@ ClientPtr client;
-  *    Undoes OnlyListentToOneClient()
-  ****************/
- 
-+void
- ListenToAllClients()
- {
-     if (GrabInProgress) {
-@@ -1801,6 +1806,7 @@ ListenToAllClients()
- 
- /* make client impervious to grabs; assume only executing client calls this */
- 
-+void
- MakeClientGrabImpervious(client)
- ClientPtr client;
- {
-@@ -1812,6 +1818,7 @@ ClientPtr client;
- 
- /* make client pervious to grabs; assume only executing client calls this */
- 
-+void
- MakeClientGrabPervious(client)
- ClientPtr client;
- {
-@@ -1974,6 +1981,7 @@ CloseDownFileDescriptor(OsCommPtr oc)
-     xfree(oc);
- }
- 
-+void
- CloseDownConnection(client)
- ClientPtr client;
- {
-@@ -1989,18 +1997,21 @@ ClientPtr client;
-     client->osPrivate = (pointer) NULL;
- }
- 
-+void
- AddEnabledDevice(fd)
- int fd;
- {
-     ASIO_FD_SET(fd, ASIO_READ, &InprogressFdSet);
- }
- 
-+void
- RemoveEnabledDevice(fd)
- int fd;
- {
-     ASIO_FD_CLR(fd, ASIO_READ, &InprogressFdSet);
- }
- 
-+void
- OnlyListenToOneClient(client)
- ClientPtr client;
- {
-@@ -2014,6 +2025,7 @@ ClientPtr client;
-     }
- }
- 
-+void
- ListenToAllClients()
- {
-     if (GrabInProgress) {
-@@ -2312,6 +2324,7 @@ pointer closure;
- 
- #define NOROOM "Maximum number of clients reached"
- 
-+void
- OnlyListenToOneClient(client)
- ClientPtr client;
- {
-@@ -2322,6 +2335,7 @@ ClientPtr client;
-         grabClient = client;
- }
- 
-+void
- CloseDownConnection(client)
- ClientPtr client;
- {
-@@ -2339,18 +2353,21 @@ ClientPtr client;
-     client->osPrivate = (pointer) NULL;
- }
- 
-+void
- ListenToAllClients()
- {
-     grabClient = NULL;
- }
- 
- /* These two are dummies -- and are never called at run-time */
-+void
- AddEnabledDevice(fd)
- int fd;
- {
-     return;
- }
- 
-+void
- RemoveEnabledDevice(fd)
- int fd;
- {
-diff --git a/server/os/daemon.c b/server/os/daemon.c
-index 9a92b88..187fd9b 100644
---- a/server/os/daemon.c
-+++ b/server/os/daemon.c
-@@ -36,6 +36,7 @@ from the X Consortium.
- 
- #include <stdio.h>
- #include <stdlib.h>
-+#include <unistd.h>
- 
- #include <fcntl.h>
- #include <sys/types.h>
-@@ -60,6 +61,9 @@ from the X Consortium.
- #endif
- 
- #include "os.h"
-+#if defined(linux) || defined(CSRG_BASED) || defined(__QNXNTO__)
-+#include "aulog.h"
-+#endif
- 
- void
- osBecomeOrphan(void)
-diff --git a/server/os/io.c b/server/os/io.c
-index b607da3..8def950 100644
---- a/server/os/io.c
-+++ b/server/os/io.c
-@@ -369,7 +369,7 @@ int count;
-  *    Reset to reexecute the current request, and yield.
-  *
-  **********************/
--
-+void
- ResetCurrentRequest(client)
- ClientPtr client;
- {
-@@ -966,6 +966,7 @@ int count;
-     return TRUE;
- }
- 
-+void
- ResetCurrentRequest(client)
- ClientPtr client;
- {
-diff --git a/server/os/mitauth.c b/server/os/mitauth.c
-index f1039b7..891bd3f 100644
---- a/server/os/mitauth.c
-+++ b/server/os/mitauth.c
-@@ -119,6 +119,7 @@ char *data;
-     return (AuID) - 1;
- }
- 
-+int
- MitFromID(id, data_lenp, datap)
- AuID id;
- unsigned short *data_lenp;
-@@ -136,6 +137,7 @@ char **datap;
-     return 0;
- }
- 
-+int
- MitRemoveCookie(data_length, data)
- unsigned short data_length;
- char *data;
-diff --git a/server/os/osdep.h b/server/os/osdep.h
-index 27ce620..bbbd0d3 100644
---- a/server/os/osdep.h
-+++ b/server/os/osdep.h
-@@ -47,6 +47,9 @@ SOFTWARE.
- 
- ******************************************************************/
- 
-+#ifndef OSDEP_H
-+#define OSDEP_H
-+
- #ifdef AMOEBA
- #include <stddef.h>
- #include <amoeba.h>
-@@ -306,3 +309,5 @@ extern int nNewConns;           /* # of new clients */
- 
- extern semaphore init_sema;     /* Initialize semaphore */
- #endif /* AMOEBA */
-+
-+#endif /* ndef OSDEP_H */
--- 
-2.39.1
-

diff --git a/media-libs/nas/nas-1.9.5-r1.ebuild b/media-libs/nas/nas-1.9.5-r1.ebuild
index f8dd1d5ac36b..f4e87bbd6ae1 100644
--- a/media-libs/nas/nas-1.9.5-r1.ebuild
+++ b/media-libs/nas/nas-1.9.5-r1.ebuild
@@ -8,6 +8,7 @@ inherit flag-o-matic multilib multilib-minimal toolchain-funcs
 DESCRIPTION="Network Audio System"
 HOMEPAGE="https://radscan.com/nas.html"
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-1.9.5-patches.tar.xz"
 
 LICENSE="HPND MIT"
 SLOT="0"
@@ -39,11 +40,7 @@ BDEPEND="
 DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
 
 PATCHES=(
-	"${FILESDIR}/${PN}-1.9.2-asneeded.patch"
-	"${FILESDIR}/${PN}-1.9.4-libfl.patch"
-	# Applied upstream
-	"${FILESDIR}"/nas-1.9.5-No-implicit-ints-and-function-declarations.patch
-	"${FILESDIR}"/nas-1.9.5-Correct-pointer-types-for-GCC-14.patch
+	"${WORKDIR}"/${PN}-1.9.5-patches
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/
@ 2024-06-30 11:01 Miroslav Šulc
  0 siblings, 0 replies; 5+ messages in thread
From: Miroslav Šulc @ 2024-06-30 11:01 UTC (permalink / raw
  To: gentoo-commits

commit:     af5d77ccbceaf50f65a7da061f83ae0d8c0aa061
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sat Jun 29 18:07:30 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sun Jun 30 11:01:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af5d77cc

media-libs/nas: Fix passing of incompatible pointer type

Closes: https://bugs.gentoo.org/927451
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36484
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../nas/files/nas-1.9.5-gcc14-build-fix.patch      | 76 ++++++++++++++++++++++
 .../{nas-1.9.5-r1.ebuild => nas-1.9.5-r2.ebuild}   |  3 +-
 2 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch b/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch
new file mode 100644
index 000000000000..629bd5dff2f0
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.5-gcc14-build-fix.patch
@@ -0,0 +1,76 @@
+https://sourceforge.net/p/nas/bugs/15/
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Tue, 30 Apr 2024 01:06:32 +0530
+Subject: [PATCH 1/1] Partially revert commit e792e42
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit e792e42 introduced some regression with GCC 14 and 15 espcially
+to the chaged sections of the code in audemo.c. Thus resutling in errors
+such as:
+
+audemo.c: In function ‘rescanCB’:
+audemo.c:524:23: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
+  524 |                       (const char **)makeFileList(globals->fileNames, globals->numFiles),
+      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      |                       |
+      |                       const char **
+In file included from audemo.c:97:
+/usr/include/X11/Xaw/List.h:170:26: note: expected ‘char **’ but argument is of type ‘const char **’
+  170 |  String                 *list,
+      |  ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
+audemo.c:530:41: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
+  530 |         XawListChange(globals->samples, &noFilesString, 1, -1, True);
+      |                                         ^~~~~~~~~~~~~~
+      |                                         |
+      |                                         const char **
+/usr/include/X11/Xaw/List.h:170:26: note: expected ‘char **’ but argument is of type ‘const char **’
+  170 |  String                 *list,
+      |  ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
+
+First observed on Gentoo Linux with GCC 14, I reproduced with GCC 15 as
+well. Please reffer: https://bugs.gentoo.org/927451
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/clients/audio/audemo/audemo.c
++++ b/clients/audio/audemo/audemo.c
+@@ -501,7 +501,7 @@ static void
+ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ {
+     GlobalDataPtr       globals = (GlobalDataPtr) globalsp;
+-    static const char   *noFilesString = "No files found";
++    static char   *noFilesString = "No files found";
+     char                *dir,
+                         *template;
+     int                 i;
+@@ -521,7 +521,7 @@ rescanCB(Widget w, XtPointer globalsp, XtPointer call_data)
+     if (globals->numFiles)
+     {
+ 	XawListChange(globals->samples,
+-		      (const char **)makeFileList(globals->fileNames, globals->numFiles),
++		      makeFileList(globals->fileNames, globals->numFiles),
+ 		      globals->numFiles, -1, True);
+ 	XtSetSensitive(globals->samples, True);
+     }
+@@ -597,7 +597,7 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
+                         access[4],
+ 			desc[COMMENT_LEN];
+     int                 i;
+-    static const char  *noBucketString = "No buckets";
++    static char  *noBucketString = "No buckets";
+ 
+     if (buf->numBuckets)
+     {
+@@ -652,7 +652,7 @@ bucketQueryCB(Widget w, XtPointer globalsp, XtPointer call_data)
+ 
+     if (buf->numBuckets)
+     {
+-	XawListChange(buf->bucketList, (const char **)buf->bucketText,
++	XawListChange(buf->bucketList, buf->bucketText,
+ 	              buf->numBuckets, -1, True);
+ 	XtSetSensitive(buf->bucketList, True);
+     }
+-- 
+2.45.0.rc1.218.g7b19149425.dirty
+

diff --git a/media-libs/nas/nas-1.9.5-r1.ebuild b/media-libs/nas/nas-1.9.5-r2.ebuild
similarity index 96%
rename from media-libs/nas/nas-1.9.5-r1.ebuild
rename to media-libs/nas/nas-1.9.5-r2.ebuild
index 79a34f036d84..fe99a2a96c22 100644
--- a/media-libs/nas/nas-1.9.5-r1.ebuild
+++ b/media-libs/nas/nas-1.9.5-r2.ebuild
@@ -7,7 +7,7 @@ inherit flag-o-matic multilib multilib-minimal toolchain-funcs
 
 DESCRIPTION="Network Audio System"
 HOMEPAGE="https://radscan.com/nas.html"
-SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-1.9.5-patches.tar.xz"
 
 LICENSE="HPND MIT"
@@ -41,6 +41,7 @@ DOCS=( BUILDNOTES FAQ HISTORY README RELEASE TODO )
 
 PATCHES=(
 	"${WORKDIR}"/${PN}-1.9.5-patches
+	"${FILESDIR}"/${PN}-1.9.5-gcc14-build-fix.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-30 11:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-22 22:23 [gentoo-commits] repo/gentoo:master commit in: media-libs/nas/files/, media-libs/nas/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-03-18  9:23 Miroslav Šulc
2024-03-20  6:26 Sam James
2024-03-20  6:26 Sam James
2024-06-30 11:01 Miroslav Šulc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox