net-misc/vmnet: replace missing function with posix one, for musl

I'd rather drop this package, instead.

[sam: Revbump.]

Closes: https://bugs.gentoo.org/897956
Closes: https://bugs.gentoo.org/907888
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/36055
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2024-04-02 12:43:32 +04:00
committed by Sam James
parent a152cde440
commit d2d791f87e
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
diff -ru vmnet-0.4.orig/vmnet.c vmnet-0.4/vmnet.c
--- vmnet-0.4.orig/vmnet.c 2024-04-02 08:35:41.521216356 +0000
+++ vmnet-0.4/vmnet.c 2024-04-02 08:37:34.760604906 +0000
@@ -50,6 +50,7 @@
*/
#define _GNU_SOURCE
+#define _XOPEN_SOURCE 700
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
@@ -197,7 +198,7 @@
int master, slave;
char name[1024];
- master = getpt();
+ master = posix_openpt(O_RDWR);
if (master < 0) {
return 0;
}

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -25,6 +25,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${WORKDIR}"/${P/-/_}-1.diff
"${FILESDIR}"/${PN}-0.4-Fix-build-with-Clang-16.patch
"${FILESDIR}"/${PN}-0.4-replace-missing-musl-function.patch
)
src_compile() {