[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v21 06/33] libtasn1: adjust the header paths in libtasn1.h
From: |
Gary Lin |
Subject: |
[PATCH v21 06/33] libtasn1: adjust the header paths in libtasn1.h |
Date: |
Mon, 4 Nov 2024 15:31:39 +0800 |
Since libtasn1.h is the header to be included by users, including the
standard POSIX headers in libtasn1.h would force the user to add the
CFLAGS/CPPFLAGS for the POSIX headers.
This commit adjusts the header paths to use the grub headers instead of
the standard POSIX headers, so that users only need to include
libtasn1.h to use libtasn1 functions.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
...djust-the-header-paths-in-libtasn1.h.patch | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644
grub-core/lib/libtasn1-patches/0004-libtasn1-adjust-the-header-paths-in-libtasn1.h.patch
diff --git
a/grub-core/lib/libtasn1-patches/0004-libtasn1-adjust-the-header-paths-in-libtasn1.h.patch
b/grub-core/lib/libtasn1-patches/0004-libtasn1-adjust-the-header-paths-in-libtasn1.h.patch
new file mode 100644
index 000000000..a5d5be417
--- /dev/null
+++
b/grub-core/lib/libtasn1-patches/0004-libtasn1-adjust-the-header-paths-in-libtasn1.h.patch
@@ -0,0 +1,39 @@
+From 24036474fab426917507fcadc85a83fa0b1cef3b Mon Sep 17 00:00:00 2001
+From: Gary Lin <glin@suse.com>
+Date: Tue, 25 Jun 2024 16:30:40 +0800
+Subject: [PATCH 04/13] libtasn1: adjust the header paths in libtasn1.h
+
+Since libtasn1.h is the header to be included by users, including the
+standard POSIX headers in libtasn1.h would force the user to add the
+CFLAGS/CPPFLAGS for the POSIX headers.
+
+This commit adjusts the header paths to use the grub headers instead of
+the standard POSIX headers, so that users only need to include
+libtasn1.h to use libtasn1 functions.
+
+Signed-off-by: Daniel Axtens <dja@axtens.net>
+Signed-off-by: Gary Lin <glin@suse.com>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ grub-core/lib/libtasn1-grub/libtasn1.h | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/grub-core/lib/libtasn1-grub/libtasn1.h
b/grub-core/lib/libtasn1-grub/libtasn1.h
+index 058ab27b0..7d64b6ab7 100644
+--- a/grub-core/lib/libtasn1-grub/libtasn1.h
++++ b/grub-core/lib/libtasn1-grub/libtasn1.h
+@@ -54,9 +54,8 @@
+ # define __LIBTASN1_PURE__
+ # endif
+
+-# include <sys/types.h>
+-# include <time.h>
+-# include <stdio.h> /* for FILE* */
++# include <grub/types.h>
++# include <grub/time.h>
+
+ # ifdef __cplusplus
+ extern "C"
+--
+2.43.0
+
--
2.43.0
- [PATCH v21 03/33] libtasn1: disable code not needed in grub, (continued)
- [PATCH v21 03/33] libtasn1: disable code not needed in grub, Gary Lin, 2024/11/04
- [PATCH v21 04/33] libtasn1: replace strcat() with strcpy() in _asn1_str_cat(), Gary Lin, 2024/11/04
- [PATCH v21 02/33] libtasn1: import libtasn1-4.19.0, Gary Lin, 2024/11/04
- [PATCH v21 05/33] libtasn1: replace strcat() with _asn1_str_cat(), Gary Lin, 2024/11/04
- [PATCH v21 08/33] libtasn1: fix the potential buffer overrun, Gary Lin, 2024/11/04
- [PATCH v21 09/33] asn1_test: include asn1_test.h only, Gary Lin, 2024/11/04
- [PATCH v21 07/33] libtasn1: Use grub_divmod64() for division, Gary Lin, 2024/11/04
- [PATCH v21 15/33] asn1_test: enable the testcase only when GRUB_LONG_MAX is larger than GRUB_INT_MAX, Gary Lin, 2024/11/04
- [PATCH v21 16/33] libtasn1: compile into asn1 module, Gary Lin, 2024/11/04
- [PATCH v21 14/33] asn1_test: use the grub-specific functions and types, Gary Lin, 2024/11/04
- [PATCH v21 06/33] libtasn1: adjust the header paths in libtasn1.h,
Gary Lin <=
- [PATCH v21 13/33] asn1_test: print the error messages with grub_printf(), Gary Lin, 2024/11/04
- [PATCH v21 11/33] asn1_test: return either 0 or 1 to reflect the results, Gary Lin, 2024/11/04
- [PATCH v21 10/33] asn1_test: rename the main functions to the test names, Gary Lin, 2024/11/04
- [PATCH v21 12/33] asn1_test: remove 'verbose' and the unnecessary printf(), Gary Lin, 2024/11/04
- [PATCH v21 17/33] asn1_test: test module for libtasn1, Gary Lin, 2024/11/04
- [PATCH v21 20/33] tss2: Add TPM2 buffer handling functions, Gary Lin, 2024/11/04
- [PATCH v21 18/33] libtasn1: Add the documentation, Gary Lin, 2024/11/04
- [PATCH v21 19/33] key_protector: Add key protectors framework, Gary Lin, 2024/11/04
- [PATCH v21 21/33] tss2: Add TPM2 types and Marshal/Unmarshal functions, Gary Lin, 2024/11/04