Blame patches/sash-3.8_pre.local.patch

67b934
diff -ru sash-3.8.orig/Makefile sash-3.8/Makefile
67b934
--- sash-3.8.orig/Makefile	2014-03-05 09:56:53.000000000 +0000
67b934
+++ sash-3.8/Makefile	2022-01-01 12:37:34.553415100 +0000
67b934
@@ -19,17 +19,17 @@
67b934
 #
67b934
 
67b934
 HAVE_GZIP		= 1
67b934
-HAVE_LINUX_ATTR		= 1
67b934
-HAVE_LINUX_CHROOT	= 1
67b934
-HAVE_LINUX_LOSETUP	= 1
67b934
-HAVE_LINUX_PIVOT	= 1
67b934
-HAVE_LINUX_MOUNT	= 1
67b934
+HAVE_LINUX_ATTR		= 0
67b934
+HAVE_LINUX_CHROOT	= 0
67b934
+HAVE_LINUX_LOSETUP	= 0
67b934
+HAVE_LINUX_PIVOT	= 0
67b934
+HAVE_LINUX_MOUNT	= 0
67b934
 HAVE_BSD_MOUNT		= 0
67b934
 MOUNT_TYPE		= '"ext3"'
67b934
 
67b934
 OPT = -O3
67b934
 
67b934
-CFLAGS = $(OPT) -Wall -Wmissing-prototypes \
67b934
+CFLAGS ?= $(OPT) -Wall -Wmissing-prototypes \
67b934
 	-DHAVE_GZIP=$(HAVE_GZIP) \
67b934
 	-DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
67b934
  	-DHAVE_LINUX_CHROOT=$(HAVE_LINUX_CHROOT) \
67b934
@@ -39,11 +39,11 @@
67b934
 	-DHAVE_BSD_MOUNT=$(HAVE_BSD_MOUNT) \
67b934
 	-DMOUNT_TYPE=$(MOUNT_TYPE)
67b934
 
67b934
-LDFLAGS = -static
67b934
+LDFLAGS ?= 
67b934
 LIBS = -lz
67b934
 
67b934
 
67b934
-DESTDIR =
67b934
+DESTDIR ?=
67b934
 BINDIR = /bin
67b934
 MANDIR = /usr/man
67b934
 
67b934
@@ -54,7 +54,6 @@
67b934
 
67b934
 sash:	$(OBJS)
67b934
 	$(CC) $(LDFLAGS) -o sash $(OBJS) $(LIBS)
67b934
-	strip sash
67b934
 
67b934
 clean:
67b934
 	rm -f $(OBJS) sash
67b934
diff -ru sash-3.8.orig/cmd_ls.c sash-3.8/cmd_ls.c
67b934
--- sash-3.8.orig/cmd_ls.c	2014-03-07 13:22:12.000000000 +0000
67b934
+++ sash-3.8/cmd_ls.c	2022-01-01 12:28:01.965328000 +0000
67b934
@@ -418,7 +418,7 @@
67b934
 			if (pwd)
67b934
 				strcpy(userName, pwd->pw_name);
67b934
 			else
67b934
-				sprintf(userName, "%d", statBuf->st_uid);
67b934
+				sprintf(userName, "%ld", statBuf->st_uid);
67b934
 
67b934
 			userId = statBuf->st_uid;
67b934
 			userIdKnown = TRUE;
67b934
@@ -437,7 +437,7 @@
67b934
 			if (grp)
67b934
 				strcpy(groupName, grp->gr_name);
67b934
 			else
67b934
-				sprintf(groupName, "%d", statBuf->st_gid);
67b934
+				sprintf(groupName, "%ld", statBuf->st_gid);
67b934
 
67b934
 			groupId = statBuf->st_gid;
67b934
 			groupIdKnown = TRUE;
67b934
diff -ru sash-3.8.orig/cmds.c sash-3.8/cmds.c
67b934
--- sash-3.8.orig/cmds.c	2014-03-07 13:06:29.000000000 +0000
67b934
+++ sash-3.8/cmds.c	2022-01-01 12:33:17.337692200 +0000
67b934
@@ -10,7 +10,9 @@
67b934
 
67b934
 #include <sys/types.h>
67b934
 #include <sys/stat.h>
67b934
+#ifdef HAVE_SYS_MOUNT
67b934
 #include <sys/mount.h>
67b934
+#endif
67b934
 #include <signal.h>
67b934
 #include <pwd.h>
67b934
 #include <grp.h>
67b934
@@ -21,6 +23,7 @@
67b934
 #include <linux/fs.h>
67b934
 #endif
67b934
 
67b934
+#ifdef __linux__
67b934
 /* Need to tell loop.h what the actual dev_t type is. */
67b934
 #undef dev_t
67b934
 #if defined(__alpha) || (defined(__sparc__) && defined(__arch64__))
67b934
@@ -31,7 +34,7 @@
67b934
 #include <linux/loop.h>
67b934
 #undef dev_t
67b934
 #define dev_t dev_t
67b934
-
67b934
+#endif
67b934
 
67b934
 int
67b934
 do_echo(int argc, const char ** argv)
67b934
@@ -657,6 +660,7 @@
67b934
 }
67b934
 
67b934
 
67b934
+#ifndef __midipix__
67b934
 int
67b934
 do_mount(int argc, const char ** argv)
67b934
 {
67b934
@@ -846,7 +850,7 @@
67b934
 #endif
67b934
 	return 0;
67b934
 }
67b934
-
67b934
+#endif
67b934
 
67b934
 int
67b934
 do_cmp(int argc, const char ** argv)
67b934
diff -ru sash-3.8.orig/sash.c sash-3.8/sash.c
67b934
--- sash-3.8.orig/sash.c	2014-03-07 13:18:42.000000000 +0000
67b934
+++ sash-3.8/sash.c	2022-01-01 12:32:11.834448200 +0000
67b934
@@ -107,7 +107,7 @@
67b934
 		"srcName ... destName"
67b934
 	},
67b934
 
67b934
-#ifdef	HAVE_LINUX_CHROOT
67b934
+#if	HAVE_LINUX_CHROOT
67b934
 	{
67b934
 		"-chroot",	do_chroot,	2,	2,
67b934
 		"change root file system",
67b934
@@ -189,7 +189,7 @@
67b934
 		"[-sig] pid ..."
67b934
 	},
67b934
 
67b934
-#ifdef	HAVE_LINUX_LOSETUP
67b934
+#if	HAVE_LINUX_LOSETUP
67b934
 	{
67b934
 		"-losetup",	do_losetup,	3,	3,
67b934
 		"Associate a loopback device with a file",
67b934
@@ -235,6 +235,7 @@
67b934
 		"fileName ..."
67b934
 	},
67b934
 
67b934
+#ifndef __midipix__
67b934
 	{
67b934
 		"-mount",	do_mount,	3,	INFINITE_ARGS,
67b934
 		"Mount or remount a filesystem on a directory",
67b934
@@ -246,6 +247,7 @@
67b934
 		"[-t type] devName dirName"
67b934
 #endif
67b934
 	},
67b934
+#endif
67b934
 
67b934
 	{
67b934
 		"-mv",		do_mv,		3,	INFINITE_ARGS,
67b934
@@ -253,7 +255,7 @@
67b934
 		"srcName ... destName"
67b934
 	},
67b934
 
67b934
-#ifdef	HAVE_LINUX_PIVOT
67b934
+#if	HAVE_LINUX_PIVOT
67b934
 	{
67b934
 		"-pivot_root",	do_pivot_root,	3,	3,
67b934
 		"pivot the root file system",
67b934
@@ -339,6 +341,7 @@
67b934
 		"[mask]"
67b934
 	},
67b934
 
67b934
+#ifndef __midipix__
67b934
 	{
67b934
 #if	HAVE_BSD_MOUNT
67b934
 		"-umount",	do_umount,	2,	3,
67b934
@@ -350,6 +353,7 @@
67b934
 		"fileName"
67b934
 #endif
67b934
 	},
67b934
+#endif
67b934
 
67b934
 	{
67b934
 		"unalias",	do_unalias,	2,	2,
67b934
diff -ru sash-3.8.orig/sash.h sash-3.8/sash.h
67b934
--- sash-3.8.orig/sash.h	2014-03-07 13:46:49.000000000 +0000
67b934
+++ sash-3.8/sash.h	2022-01-01 12:31:48.133317800 +0000
67b934
@@ -88,8 +88,10 @@
67b934
 extern	int	do_dd(int argc, const char ** argv);
67b934
 extern	int	do_tar(int argc, const char ** argv);
67b934
 extern	int	do_ar(int argc, const char ** argv);
67b934
+#ifndef __midipix__
67b934
 extern	int	do_mount(int argc, const char ** argv);
67b934
 extern	int	do_umount(int argc, const char ** argv);
67b934
+#endif
67b934
 extern	int	do_setenv(int argc, const char ** argv);
67b934
 extern	int	do_pwd(int argc, const char ** argv);
67b934
 extern	int	do_echo(int argc, const char ** argv);