videoutils/openh264: fix CI error since no sys/sysctl.h
Add sys/sysctl.h to apps/videoutils/openh264 Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
This commit is contained in:
parent
697aa8f43e
commit
7704254f68
@ -91,7 +91,8 @@ if(CONFIG_VIDEOUTILS_OPENH264)
|
|||||||
# Include Directory
|
# Include Directory
|
||||||
# ############################################################################
|
# ############################################################################
|
||||||
|
|
||||||
set(INCLUDES ${SRC_PATH}/codec/api/wels ${SRC_PATH}/codec/common/inc)
|
set(INCLUDES ${SRC_PATH}/codec/api/wels ${SRC_PATH}/codec/common/inc
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/include)
|
||||||
set(DECODER_INCLUDES ${SRC_PATH}/codec/decoder/core/inc
|
set(DECODER_INCLUDES ${SRC_PATH}/codec/decoder/core/inc
|
||||||
${SRC_PATH}/codec/decoder/plus/inc)
|
${SRC_PATH}/codec/decoder/plus/inc)
|
||||||
set(PROCESSING_INCLUDES
|
set(PROCESSING_INCLUDES
|
||||||
@ -111,20 +112,6 @@ if(CONFIG_VIDEOUTILS_OPENH264)
|
|||||||
|
|
||||||
set(CXXFLAGS -Wno-format -Wno-unused-variable -Wno-shadow)
|
set(CXXFLAGS -Wno-format -Wno-unused-variable -Wno-shadow)
|
||||||
|
|
||||||
# cmake-format: off
|
|
||||||
set(SYSCTLBYNAME
|
|
||||||
[=[
|
|
||||||
#ifndef HAVE_SYSCTLBYNAME
|
|
||||||
#define sysctlbyname(name, oldp, oldlenp, newp, newlen) (-1)
|
|
||||||
#endif
|
|
||||||
]=])
|
|
||||||
# cmake-format: on
|
|
||||||
|
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/def_sysctlbyname.h ${SYSCTLBYNAME})
|
|
||||||
|
|
||||||
list(APPEND CXXFLAGS
|
|
||||||
"SHELL:-include ${CMAKE_CURRENT_BINARY_DIR}/def_sysctlbyname.h")
|
|
||||||
|
|
||||||
# ############################################################################
|
# ############################################################################
|
||||||
# Library Configuration
|
# Library Configuration
|
||||||
# ############################################################################
|
# ############################################################################
|
||||||
|
@ -23,6 +23,7 @@ include $(APPDIR)/Make.defs
|
|||||||
SRC_PATH := openh264
|
SRC_PATH := openh264
|
||||||
|
|
||||||
INCLUDES += \
|
INCLUDES += \
|
||||||
|
-I$(CURDIR)/include \
|
||||||
-I$(SRC_PATH)/codec/api/wels \
|
-I$(SRC_PATH)/codec/api/wels \
|
||||||
-I$(SRC_PATH)/codec/common/inc \
|
-I$(SRC_PATH)/codec/common/inc \
|
||||||
-Icodec/common/inc
|
-Icodec/common/inc
|
||||||
@ -102,9 +103,6 @@ DECODER_ASM_SRCS += \
|
|||||||
|
|
||||||
CXXFLAGS += $(INCLUDES) $(DECODER_INCLUDES)
|
CXXFLAGS += $(INCLUDES) $(DECODER_INCLUDES)
|
||||||
CXXFLAGS += -Wno-unused-variable -Wno-shadow -lstdc++
|
CXXFLAGS += -Wno-unused-variable -Wno-shadow -lstdc++
|
||||||
ifndef HAVE_SYSCTLBYNAME
|
|
||||||
CXXFLAGS += -D'sysctlbyname(name, oldp, oldlenp, newp, newlen)=-1'
|
|
||||||
endif
|
|
||||||
|
|
||||||
CXXEXT = .cpp
|
CXXEXT = .cpp
|
||||||
CXXSRCS += $(COMMON_CPP_SRCS) $(DECODER_CPP_SRCS)
|
CXXSRCS += $(COMMON_CPP_SRCS) $(DECODER_CPP_SRCS)
|
||||||
|
32
videoutils/openh264/include/sys/sysctl.h
Normal file
32
videoutils/openh264/include/sys/sysctl.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* apps/videoutils/openh264/include/sys/sysctl.h
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __APPS_VIDEOUTILS_OPENH264_INCLUDE_SYS_SYSCTL_H
|
||||||
|
#define __APPS_VIDEOUTILS_OPENH264_INCLUDE_SYS_SYSCTL_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#define sysctl(args) (-1)
|
||||||
|
#define sysctlbyname(name, oldp, oldlenp, newp, newlen) (-1)
|
||||||
|
#define sysctlnametomib(name, mibp, sizep) (-1)
|
||||||
|
|
||||||
|
#endif /* __APPS_VIDEOUTILS_OPENH264_INCLUDE_SYS_SYSCTL_H */
|
Loading…
x
Reference in New Issue
Block a user