fix compile failure by GCC-10

Signed-off-by: Lu Weitao <luweitaobe@163.com>
(cherry picked from commit f9c873909b66488c1c8f1fc226457c01e7baf437)
This commit is contained in:
Lu Weitao 2021-08-10 15:27:15 +08:00 committed by openeuler-sync-bot
parent 0162ac4b62
commit 06f7e40d55
3 changed files with 51 additions and 1 deletions

33
fix-multi-define.patch Normal file
View File

@ -0,0 +1,33 @@
diff -urN ./src/omx_reference_resource_manager.c ./src/omx_reference_resource_manager.c
--- ./src/omx_reference_resource_manager.c 2021-08-05 18:44:02.502180627 +0800
+++ ./src/omx_reference_resource_manager.c 2021-08-05 18:47:24.151838514 +0800
@@ -30,6 +30,11 @@
#include "base/omx_base_component.h"
#include "queue.h"
+int globalIndex;
+NameIndexType *listOfcomponentRegistered;
+ComponentListType **globalComponentList;
+ComponentListType **globalWaitingComponentList;
+
/**
* This is the static base pointer of the list
*/
diff -urN ./src/omx_reference_resource_manager.h ./src/omx_reference_resource_manager.h
--- ./src/omx_reference_resource_manager.h 2011-01-12 15:53:26.000000000 +0800
+++ ./src/omx_reference_resource_manager.h 2021-08-05 18:46:51.663571188 +0800
@@ -49,10 +49,10 @@
};
-int globalIndex;
-NameIndexType *listOfcomponentRegistered;
-ComponentListType **globalComponentList;
-ComponentListType **globalWaitingComponentList;
+extern int globalIndex;
+extern NameIndexType *listOfcomponentRegistered;
+extern ComponentListType **globalComponentList;
+extern ComponentListType **globalWaitingComponentList;
OMX_ERRORTYPE RM_RegisterComponent(char *name, int max_components);
OMX_ERRORTYPE addElemToList(ComponentListType **list, OMX_COMPONENTTYPE *openmaxStandComp, int index, OMX_BOOL bIsWaiting);

View File

@ -0,0 +1,12 @@
diff -urN ./src/omx_create_loaders_linux.c ./src/omx_create_loaders_linux.c
--- ./src/omx_create_loaders_linux.c 2011-05-20 13:28:17.000000000 +0800
+++ ./src/omx_create_loaders_linux.c 2021-08-05 18:45:57.607126826 +0800
@@ -95,7 +95,7 @@
if (isFileExisting) {
loaderFP = fopen(omxloader_registry_filename, "r");
// dlopen all loaders defined in .omxloaders file
- libraryFileName = malloc(MAX_LINE_LENGTH);
+ libraryFileName = malloc(MAX_LINE_LENGTH + 1);
while(1) {
index_readline = 0;
while(index_readline < MAX_LINE_LENGTH) {

View File

@ -1,6 +1,6 @@
Name: libomxil-bellagio
Version: 0.9.3
Release: 21
Release: 22
Summary: OpenMAX Integration Layer
License: LGPLv2+
URL: http://omxil.sourceforge.net
@ -14,6 +14,8 @@ Patch0006: bellagio-0.9.3-segfault-on-removeFromWaitResource.patch
Patch0007: omxil_version.patch
Patch0008: libomxil-bellagio-0.9.3-memcpy.patch
Patch0009: libomxil-bellagio-0.9.3-valgrind_register.patch
Patch0010: fix-stringop-overflow.patch
Patch0011: fix-multi-define.patch
BuildRequires: doxygen libtool gcc-c++
%description
@ -98,5 +100,8 @@ install -pm 0755 test/components/resource_manager/.libs/{omxprioritytest,omxrmte
%changelog
* Sat Jul 31 2021 luweitao <luweitao2@huawei.com> - 0.9.3-22
- fix failure by upgrade to GCC-10
* Tue Dec 31 2019 zoushuangshuang <zoushuangshuang@huawei.com> - 0.9.3-21
- Package init