-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 81268c62d35f4b4bc226a4916a8354764b1f5853 Mon Sep 17 00:00:00 2001 | ||
From: Ivy Foster <iff@escondida.tk> | ||
Date: Sat, 18 May 2019 14:25:01 -0500 | ||
Subject: [PATCH] 9l: Update and near-future-proof Linux version check | ||
|
||
--- | ||
bin/9l | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git bin/9l bin/9l | ||
index 6195815f7..d03b4760e 100755 | ||
--- bin/9l | ||
+++ bin/9l | ||
@@ -40,7 +40,9 @@ case "$tag" in | ||
userpath=true | ||
extralibs="$extralibs -lutil -lresolv" | ||
case "${SYSVERSION:-`uname -r`}" in | ||
- 2.6.* | 3.* | 4.*) | ||
+ # Assuming that versions change more often than the name of | ||
+ # the threading library, this should save some future updates. | ||
+ 2.6.* | [3-9].* | [1-9][0-9].*) | ||
extralibs="$extralibs -lpthread" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git src/lib9/dirread.c src/lib9/dirread.c | ||
index 40fbe3c7..9e77eac8 100644 | ||
--- src/lib9/dirread.c | ||
+++ src/lib9/dirread.c | ||
@@ -10,6 +10,7 @@ extern int _p9dir(struct stat*, struct stat*, char*, Dir*, char**, char*); | ||
static int | ||
mygetdents(int fd, struct dirent *buf, int n) | ||
{ | ||
+#if defined(__GLIBC__) | ||
off_t off; | ||
int nn; | ||
|
||
@@ -17,6 +18,9 @@ mygetdents(int fd, struct dirent *buf, int n) | ||
off = p9seek(fd, 0, 1); | ||
nn = getdirentries(fd, (void*)buf, n, &off); | ||
return nn; | ||
+#else | ||
+ return getdents(fd, (void*)buf, n); | ||
+#endif | ||
} | ||
#elif defined(__APPLE__) | ||
static int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters