From 12047e86b5d848096334192e64a811d16b471cd5 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 30 Jun 2015 17:42:22 +0000 Subject: [PATCH] Fix a regression when built with Clang. PR: 201165 --- devel/libx86/Makefile | 2 +- devel/libx86/files/patch-thunk.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/devel/libx86/Makefile b/devel/libx86/Makefile index 88d44e5e4707..6e9b775defe0 100644 --- a/devel/libx86/Makefile +++ b/devel/libx86/Makefile @@ -2,7 +2,7 @@ PORTNAME= libx86 PORTVERSION= 1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://www.codon.org.uk/~mjg59/libx86/downloads/ \ LOCAL/jkim diff --git a/devel/libx86/files/patch-thunk.c b/devel/libx86/files/patch-thunk.c index 13d868c5bd32..a4892d5d28b1 100644 --- a/devel/libx86/files/patch-thunk.c +++ b/devel/libx86/files/patch-thunk.c @@ -1,5 +1,5 @@ ---- thunk.c 2008-04-02 20:48:00.000000000 -0400 -+++ thunk.c 2008-12-03 19:19:25.000000000 -0500 +--- thunk.c.orig 2008-04-03 00:48:00 UTC ++++ thunk.c @@ -11,7 +11,9 @@ #include #include @@ -10,3 +10,14 @@ #include #include #include +@@ -169,8 +171,8 @@ int LRMI_init() { + X86_ESP = 0xFFF9; + memset (stack, 0, 64*1024); + +- *((char *)0) = 0x4f; /* Make sure that we end up jumping back to a +- halt instruction */ ++ *((volatile char *)0) = 0x4f; /* Make sure that we end up jumping back to a ++ halt instruction */ + + M.mem_base = 0; + M.mem_size = 1024*1024;