void-packages/srcpkgs/reiserfsprogs/patches/musl-long_long_min_max.patch
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

19 lines
463 B
Diff

Add definitions for LONG_LONG_MIN and _MAX derived
from the values for int64_t.
--- a/resize_reiserfs/resize_reiserfs.c
+++ b/resize_reiserfs/resize_reiserfs.c
@@ -15,6 +15,13 @@
#include "resize.h"
#include <limits.h>
+#if !defined(__GLIBC__)
+/* These are not defined in musl libc */
+#include <stdint.h>
+#define LONG_LONG_MIN INT64_MIN
+#define LONG_LONG_MAX INT64_MAX
+#endif
+
static int opt_banner = 0;
static int opt_skipj = 0;
int opt_force = 0;