|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/base/electricfence/sigsetjmp.patch
|
|
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
--- ./eftest.c.orig 2004-09-07 15:43:00.320833176 +0200
|
|
+++ ./eftest.c 2004-09-07 15:44:44.374014688 +0200
|
|
@@ -24,7 +24,7 @@
|
|
extern int EF_PROTECT_BELOW;
|
|
extern int EF_ALIGNMENT;
|
|
|
|
-static jmp_buf env;
|
|
+static sigjmp_buf env;
|
|
|
|
/*
|
|
* There is still too little standardization of the arguments and return
|
|
@@ -40,13 +40,13 @@
|
|
)
|
|
{
|
|
signal(PAGE_PROTECTION_VIOLATED_SIGNAL, SIG_DFL);
|
|
- longjmp(env, 1);
|
|
+ siglongjmp(env, 1);
|
|
}
|
|
|
|
static int
|
|
gotSegmentationFault(int (*test)(void))
|
|
{
|
|
- if ( setjmp(env) == 0 ) {
|
|
+ if ( sigsetjmp(env, 1) == 0 ) {
|
|
int status;
|
|
|
|
signal(PAGE_PROTECTION_VIOLATED_SIGNAL
|