Fix various build problems when building for non-HiSi config
Mainly adding missing headers, removing redundant headers that induce undefined symbols or rearranging existing headers according to dependencies betheen them. Also add missing include paths to makefiles and make configs. Note: direct inclusion of pthread.h in disk.h is caused by the latter being used almost everywhere, including third_party libraries. Putting pthread.h there releases us from affecting more code. Basically fixes build for anything that is not default HiSi configuration. Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com> Change-Id: Icdcb0874d9fed34d01fa282d33bd2e041c2ac436
This commit is contained in:
parent
01cd099ea9
commit
e0406e3df7
|
@ -47,6 +47,8 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "pthread.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "unistd.h"
|
#include "unistd.h"
|
||||||
#include "sys/mount.h"
|
#include "sys/mount.h"
|
||||||
#include "pthread.h"
|
|
||||||
#include "linux/spinlock.h"
|
#include "linux/spinlock.h"
|
||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#include "menuconfig.h"
|
||||||
|
#ifdef LOSCFG_FS_VFS
|
||||||
|
#include "fs/fs.h"
|
||||||
|
#include "fs/file.h"
|
||||||
|
#endif
|
||||||
|
#include "los_signal.h"
|
||||||
#include "los_syscall.h"
|
#include "los_syscall.h"
|
||||||
#include "los_task_pri.h"
|
#include "los_task_pri.h"
|
||||||
#include "los_process_pri.h"
|
#include "los_process_pri.h"
|
||||||
|
@ -40,10 +46,6 @@
|
||||||
#include "mqueue.h"
|
#include "mqueue.h"
|
||||||
#include "los_futex_pri.h"
|
#include "los_futex_pri.h"
|
||||||
#include "sys/times.h"
|
#include "sys/times.h"
|
||||||
#ifdef LOSCFG_FS_VFS
|
|
||||||
#include "fs/fs.h"
|
|
||||||
#include "fs/file.h"
|
|
||||||
#endif
|
|
||||||
#include "dirent.h"
|
#include "dirent.h"
|
||||||
#include "fcntl.h"
|
#include "fcntl.h"
|
||||||
#include "unistd.h"
|
#include "unistd.h"
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "los_syscall.h"
|
|
||||||
#include "los_process_pri.h"
|
#include "los_process_pri.h"
|
||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
#include "user_copy.h"
|
#include "user_copy.h"
|
||||||
#include "sys/times.h"
|
#include "sys/times.h"
|
||||||
|
#include "los_signal.h"
|
||||||
#include "los_memory.h"
|
#include "los_memory.h"
|
||||||
#include "los_strncpy_from_user.h"
|
#include "los_strncpy_from_user.h"
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ all : $(LIB)
|
||||||
|
|
||||||
$(LOCAL_COBJS): $(OBJOUT)/%.o: %.c
|
$(LOCAL_COBJS): $(OBJOUT)/%.o: %.c
|
||||||
$(HIDE)$(OBJ_MKDIR)
|
$(HIDE)$(OBJ_MKDIR)
|
||||||
$(HIDE)$(CC) $(LITEOS_CFLAGS) $(LOCAL_FLAGS) $(LOCAL_CFLAGS) -c $< -o $@
|
$(HIDE)$(CC) $(LITEOS_CFLAGS) $(LOCAL_INCLUDE) $(LOCAL_FLAGS) $(LOCAL_CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(LOCAL_CPPOBJS): $(OBJOUT)/%.o: %.cpp
|
$(LOCAL_CPPOBJS): $(OBJOUT)/%.o: %.cpp
|
||||||
$(HIDE)$(OBJ_MKDIR)
|
$(HIDE)$(OBJ_MKDIR)
|
||||||
|
|
Loading…
Reference in New Issue