Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
3,321 additions
and
728 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ version.c | |
.*.h.dep | ||
*.o | ||
/libopenconnect.la | ||
/libopenconnect-wrapper.la | ||
/*.lo | ||
/.libs/ | ||
/cscope.* | ||
|
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
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
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,33 @@ | ||
From aecf4b5e1bb335a41ea00c99c771dfa889ce314b Mon Sep 17 00:00:00 2001 | ||
From: Kevin Cernekee <cernekee@gmail.com> | ||
Date: Sun, 11 Aug 2013 13:26:39 -0700 | ||
Subject: [PATCH] Remove call to mlockall() | ||
|
||
This patch against v0.2 allows for building stoken on Android, without | ||
rerunning autotools. | ||
|
||
Signed-off-by: Kevin Cernekee <cernekee@gmail.com> | ||
--- | ||
src/common.c | 6 ------ | ||
1 file changed, 6 deletions(-) | ||
|
||
diff --git a/src/common.c b/src/common.c | ||
index d2d22f1..4711696 100644 | ||
--- a/src/common.c | ||
+++ b/src/common.c | ||
@@ -331,12 +331,6 @@ int common_init(char *cmd) | ||
struct securid_token *t; | ||
int is_import = !strcmp(cmd, "import"); | ||
|
||
- /* | ||
- * we don't actually scrub memory, but at least try to keep the seeds | ||
- * from being swapped out to disk | ||
- */ | ||
- mlockall(MCL_CURRENT | MCL_FUTURE); | ||
- | ||
cfg = xzalloc(sizeof(*cfg)); | ||
if (__stoken_read_rcfile(opt_rcfile, cfg, &warn) != ERR_NONE) | ||
__stoken_zap_rcfile_data(cfg); | ||
-- | ||
1.7.9.5 | ||
|
43 changes: 43 additions & 0 deletions
43
android/0001-fflush-freadahead-fseeko-Fix-for-Android.patch
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,43 @@ | ||
fflush, freadahead, and fseeko have trouble compiling on Android[1] | ||
because they need access to internal elements of the FILE struct. | ||
Bionic libc[2], like OpenBSD libc[3], puts the ungetc buffer "_ub" | ||
at the beginning of the __sfileext struct. Therefore we can reuse the | ||
existing OpenBSD implementation for Android. | ||
|
||
Test results (Android 4.2.2, ARMv7, NDK r9): | ||
|
||
root@android:/data/local/tmp # export srcdir=`pwd` | ||
root@android:/data/local/tmp # ./test-fflush2.sh ; echo $? | ||
0 | ||
root@android:/data/local/tmp # ./test-freadahead.sh ; echo $? | ||
0 | ||
root@android:/data/local/tmp # ./test-fseeko.sh ; echo $? | ||
0 | ||
root@android:/data/local/tmp # ./test-fseeko2.sh ; echo $? | ||
Skipping test: ungetc cannot handle arbitrary bytes | ||
77 | ||
root@android:/data/local/tmp # ./test-fseeko3.sh ; echo $? | ||
0 | ||
root@android:/data/local/tmp # ./test-fseeko4.sh ; echo $? | ||
0 | ||
|
||
[1] http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00295.html | ||
[2] https://android.googlesource.com/platform/bionic/+/android-4.3_r2.2/libc/stdio/fileext.h | ||
[3] http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=1.2;content-type=text%2Fplain | ||
|
||
diff --git a/liboath/gl/stdio-impl.h b/liboath/gl/stdio-impl.h | ||
index e00600a..45291cf 100644 | ||
--- a/liboath/gl/stdio-impl.h | ||
+++ b/liboath/gl/stdio-impl.h | ||
@@ -57,7 +57,7 @@ | ||
# define fp_ fp | ||
# endif | ||
|
||
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ | ||
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */ | ||
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> | ||
and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */ | ||
struct __sfileext | ||
-- | ||
1.7.10.4 | ||
|
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
Oops, something went wrong.