void-packages/srcpkgs/db/patches/time64.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid 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

18 lines
532 B
Diff

By the comment's own admission, this cannot affect on-disk nor ABI because
'long' varies per architecture. So, this change is always correct.
--- a/src/dbinc/clock.h 2013-09-09 15:35:08.000000000 +0000
+++ b/src/dbinc/clock.h 2020-01-31 19:22:11.630000000 +0000
@@ -54,11 +54,7 @@
*/
typedef struct {
time_t tv_sec; /* seconds */
-#ifdef HAVE_MIXED_SIZE_ADDRESSING
- int32_t tv_nsec;
-#else
- long tv_nsec; /* nanoseconds */
-#endif
+ time_t tv_nsec; /* nanoseconds */
} db_timespec;
/* Operations on timespecs */