[packages/dahdi-linux] - add local copy of stdbool.h because kernel modules are build with -nostdinc, rel 6
baggins
baggins at pld-linux.org
Sat Jan 15 11:37:17 CET 2022
commit fa56d27baf3fca44eda53a9748c13bd4bcffa721
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Jan 15 11:36:34 2022 +0100
- add local copy of stdbool.h because kernel modules are build with -nostdinc, rel 6
dahdi-linux.spec | 6 ++++--
nostdinc.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 2 deletions(-)
---
diff --git a/dahdi-linux.spec b/dahdi-linux.spec
index a9157ea..54d3154 100644
--- a/dahdi-linux.spec
+++ b/dahdi-linux.spec
@@ -35,7 +35,7 @@ exit 1
%define _enable_debug_packages 0
%endif
-%define rel 5
+%define rel 6
%define pname dahdi-linux
%define FIRMWARE_URL http://downloads.digium.com/pub/telephony/firmware/releases
Summary: DAHDI telephony device support
@@ -63,6 +63,7 @@ Patch2: math64.patch
Patch3: kernel-5.6.patch
Patch4: kernel-5.9.patch
Patch5: kernel-4.9.256.patch
+Patch6: nostdinc.patch
URL: http://www.asterisk.org/
%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
BuildRequires: perl-base
@@ -149,7 +150,7 @@ Sterownik dla jądra Linuksa do urządzeń telefonicznych DAHDI.\
%define build_kernel_pkg()\
%if %{with kernel}\
-%build_kernel_modules SUBDIRS=$PWD/drivers/dahdi DAHDI_BUILD_ALL=m HOTPLUG_FIRMWARE=yes DAHDI_MODULES_EXTRA=" " -m %{modules_in} KSRC=$PWD/o -C drivers/dahdi DAHDI_INCLUDE=$PWD/../../include\
+%build_kernel_modules V=1 SUBDIRS=$PWD/drivers/dahdi DAHDI_BUILD_ALL=m HOTPLUG_FIRMWARE=yes DAHDI_MODULES_EXTRA=" " -m %{modules_in} KSRC=$PWD/o -C drivers/dahdi DAHDI_INCLUDE=$PWD/../../include\
cd drivers/dahdi\
%install_kernel_modules -D ../../installed -m %{modules_in} -d misc\
cd ../..\
@@ -168,6 +169,7 @@ cd ../..\
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7}; do
ln -s $a drivers/dahdi/firmware
diff --git a/nostdinc.patch b/nostdinc.patch
new file mode 100644
index 0000000..32b2a0e
--- /dev/null
+++ b/nostdinc.patch
@@ -0,0 +1,55 @@
+--- /dev/null 2022-01-08 18:09:02.763467091 +0100
++++ dahdi-linux-3.1.0/drivers/dahdi/stdbool.h 2022-01-15 11:34:39.985002741 +0100
+@@ -0,0 +1,52 @@
++/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 3, or (at your option)
++any later version.
++
++GCC is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++Under Section 7 of GPL version 3, you are granted additional
++permissions described in the GCC Runtime Library Exception, version
++3.1, as published by the Free Software Foundation.
++
++You should have received a copy of the GNU General Public License and
++a copy of the GCC Runtime Library Exception along with this program;
++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
++<http://www.gnu.org/licenses/>. */
++
++/*
++ * ISO C Standard: 7.16 Boolean type and values <stdbool.h>
++ */
++
++#ifndef _STDBOOL_H
++#define _STDBOOL_H
++
++#ifndef __cplusplus
++
++#define bool _Bool
++#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
++#define true ((_Bool)+1u)
++#define false ((_Bool)+0u)
++#else
++#define true 1
++#define false 0
++#endif
++
++#else /* __cplusplus */
++
++/* Supporting _Bool in C++ is a GCC extension. */
++#define _Bool bool
++
++#endif /* __cplusplus */
++
++/* Signal that all the definitions are present. */
++#define __bool_true_false_are_defined 1
++
++#endif /* stdbool.h */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dahdi-linux.git/commitdiff/fa56d27baf3fca44eda53a9748c13bd4bcffa721
More information about the pld-cvs-commit
mailing list