VirtualBox

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

Last change on this file since 83994 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/** @file
2 * IPRT - Linux symver and compatibility definitions.
3 */
4
5/*
6 * Copyright (C) 2008-2020 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_INCLUDED_linux_symvers_h
31#define IPRT_INCLUDED_linux_symvers_h
32#ifndef RT_WITHOUT_PRAGMA_ONCE
33# pragma once
34#endif
35
36/* Please use -fno-stack-protector on the command line to avoid stack check
37 * functions which are not available in EL3 for 32-bit builds. */
38
39/* Use versions of glibc symbols which are available in 32-bit EL3 or
40 * 64-bit EL4. Currently only those symbols needed by the Additions,
41 * though this could probably be extended to work for host builds too. */
42#if defined(RT_ARCH_AMD64)
43__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
44__asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2.5");
45#else /* RT_ARCH_X86 */
46__asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2");
47#endif
48
49/* Do not use *_chk functions */
50#undef _FORTIFY_SOURCE
51
52/* Do not use __isoc99_* functions */
53#undef __USE_GNU
54#define __USE_GNU 1
55
56/* And EL5 wants this too with __USE_GNU */
57#undef _GNU_SOURCE
58#define _GNU_SOURCE 1
59
60/* Tell IPRT not to use newer functions */
61#include <features.h>
62#undef __GLIBC_MINOR__
63#define __GLIBC_MINOR__ 3
64
65/* Do not use fcntl64 */
66#include <fcntl.h>
67#ifdef fnctl
68# undef fcntl
69#endif
70#if defined(RT_ARCH_AMD64)
71__asm__(".symver fcntl64,fcntl@GLIBC_2.2.5");
72#else
73__asm__(".symver fcntl64,fcntl@GLIBC_2.0");
74#endif
75
76/* Do not use ISO C99 scanf which has a glibc 2.7 dependency. */
77#undef __GLIBC_USE_DEPRECATED_SCANF
78#define __GLIBC_USE_DEPRECATED_SCANF 1
79#endif /* !IPRT_INCLUDED_linux_symvers_h */
Note: See TracBrowser for help on using the repository browser.

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