From 598e8092f1765b4681d630ba612cef81b106ba16 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 15 Jul 2005 16:29:20 +0000 Subject: [PATCH] make copy_string able to build on older compilers (bug #4714) git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@242 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- compiler.h | 19 +++++++++++++++++++ copy_string.c | 1 + 2 files changed, 20 insertions(+) create mode 100755 compiler.h diff --git a/compiler.h b/compiler.h new file mode 100755 index 0000000..137e9e1 --- /dev/null +++ b/compiler.h @@ -0,0 +1,19 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * Compiler-specific macros and other items + * + * Copyright (C) 2005, Digium, Inc. + * + * This program is free software, distributed under the terms of + * the GNU General Public License + */ + +#ifndef _ASTERISK_COMPILER_H +#define _ASTERISK_COMPILER_H + +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) +#define __builtin_expect(exp, c) (exp) +#endif + +#endif /* _ASTERISK_COMPILER_H */ diff --git a/copy_string.c b/copy_string.c index 2bb0019..a96f160 100755 --- a/copy_string.c +++ b/copy_string.c @@ -26,6 +26,7 @@ #include #include +#include "compiler.h" #include "libpri.h" #include "pri_internal.h"