gentoo-ebuilds/sci-libs/taucs/files/taucs-2.2-missing-include.patch
NHOrus cc8a349543
sci-libs/taucs: add 2.2.1, port to C23, fix musl build.
Fixes problem with breaking handwritten makefile and config generator
that uses mkdir to test for OS (Windows/Linux)
Also fixes other build problems with GCC-15
Correcting ebuild to work on musl system was unpleasant and it looks
ugly. Such is life with horrible, hand-written makefile generator

Closes: https://bugs.gentoo.org/886467
Closes: https://bugs.gentoo.org/898294
Closes: https://bugs.gentoo.org/832812
Closes: https://bugs.gentoo.org/898296
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40691
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-24 21:25:02 +00:00

36 lines
832 B
Diff

I don't know why he uses number of arguments to distinguish if
it's windows or not. Add correct header, section off wrong
mkdirs on Windows
https://bugs.gentoo.org/898294
--- a/configurator/taucs_config.c
+++ b/configurator/taucs_config.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/stat.h>
#include "taucs_structure.h"
@@ -242,8 +242,10 @@
sprintf(name,"%s%c%s", configdir,pathsep,ostype);
if (win32) {
+#if defined _WIN32 || defined __CYGWIN__
mkdir(configdir);
mkdir(name);
+#endif
}
else {
mkdir(configdir,0777);
@@ -301,8 +303,10 @@
sprintf(name,"%s%c%s", configdir,pathsep,ostype);
if (win32) {
+#if defined _WIN32 || defined __CYGWIN__
mkdir(configdir);
mkdir(name);
+#endif
}
else {
mkdir(configdir,0777);