VirtualBox

source: vbox/trunk/include/iprt/linux/symvers.h@ 76431

Last change on this file since 76431 was 76372, checked in by vboxsync, 6 years ago

iprt/linux/symvers.h: Fixed header compilation test issue, dropping $ line (don't do this in project wide headers), removed incorrect (inverted) #endif comment, and added missing Makefile.kup file for the iprt/linux dir.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/** @file
2 * IPRT - Linux symver and compatibility definitions.
3 */
4
5/*
6 * Copyright (C) 2008-2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26/* Various tricks to produce binaries which can be run on old Linux
27 * distributions. This will almost certainly need updating as time
28 * goes by. */
29
30#ifndef ___iprt_linux_symvers_h
31#define ___iprt_linux_symvers_h
32
33/* Please use -fno-stack-protector on the command line to avoid stack check
34 * functions which are not available in EL3 for 32-bit builds. */
35
36/* Use versions of glibc symbols which are available in 32-bit EL3 or
37 * 64-bit EL4. Currently only those symbols needed by the Additions,
38 * though this could probably be extended to work for host builds too. */
39#if defined(RT_ARCH_AMD64)
40__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
41__asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2.5");
42#else /* RT_ARCH_X86 */
43__asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2");
44#endif
45
46/* Do not use *_chk functions */
47#undef _FORTIFY_SOURCE
48
49/* Do not use __isoc99_* functions */
50#undef __USE_GNU
51#define __USE_GNU 1
52
53/* And EL5 wants this too with __USE_GNU */
54#undef _GNU_SOURCE
55#define _GNU_SOURCE 1
56
57/* Tell IPRT not to use newer functions */
58#include <features.h>
59#undef __GLIBC_MINOR__
60#define __GLIBC_MINOR__ 3
61
62/* Do not use fcntl64 */
63#include <fcntl.h>
64#ifdef fnctl
65# undef fcntl
66#endif
67#if defined(RT_ARCH_AMD64)
68__asm__(".symver fcntl64,fcntl@GLIBC_2.2.5");
69#else
70__asm__(".symver fcntl64,fcntl@GLIBC_2.0");
71#endif
72
73#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette