Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error of test's compilation #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/port/async-pipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
extern "C" {
#endif

#include <signal.h>

typedef void* async_pipe_t;
typedef void (*async_pipe_onread)(void* param, int code, int bytes);
typedef void (*async_pipe_onwrite)(void* param, int code, int bytes);
Expand All @@ -25,6 +27,10 @@ int async_pipe_read(async_pipe_t pipe, void* msg, int len, async_pipe_onread cal
// return: 0-success, other-error
int async_pipe_write(async_pipe_t pipe, const void* msg, int len, async_pipe_onwrite callback, void* param);

static void aio_onread(sigval_t sigval);

static void aio_onwrite(sigval_t sigval);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declare static aio_onread/aio_onwrite ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, compiler didn't found this functions in linux-async-pipe.c without declaration in this include file. Maybe this functions can be declared in linux-async-pipe.c?


#ifdef __cplusplus
}
#endif
Expand Down
8 changes: 4 additions & 4 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _SOURCE_FILES += $(ROOT)/source/port/sysvolume.cpp
_SOURCE_FILES += $(ROOT)/source/string/snprintf.c
_SOURCE_FILES += $(ROOT)/source/string/strndup.c
_SOURCE_FILES += ./http-test.c
_SOURCE_FILES += ./rtsp-test.c
_SOURCE_FILES += ./rtsp-test.c
_SOURCE_FILES += ./sdp-test.c
SOURCE_FILES := $(filter-out $(_SOURCE_FILES),$(SOURCE_FILES))

Expand All @@ -46,7 +46,7 @@ else
LIBPATHS +=
endif

LIBS = rt pthread dl aio
LIBS = rt pthread dl aio asan
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe i should delete -fsanitize=address option in gcc.mk


STATIC_LIBS = $(ROOT)/libhttp/$(BUILD).$(PLATFORM)/libhttp.a

Expand All @@ -68,7 +68,7 @@ endif
ifdef RTSP_TEST
SOURCE_FILES += sdp-test.c
SOURCE_FILES += rtsp-test.c
SOURCE_FILES += $(ROOT)/../media-server/librtsp/source/rtsp-header-range.c
SOURCE_FILES += $(ROOT)/../media-server/librtsp/source/rtsp-header-range.c
SOURCE_FILES += $(ROOT)/../media-server/librtsp/source/rtsp-header-rtp-info.c
SOURCE_FILES += $(ROOT)/../media-server/librtsp/source/rtsp-header-session.c
SOURCE_FILES += $(ROOT)/../media-server/librtsp/source/rtsp-header-transport.c
Expand All @@ -82,4 +82,4 @@ endif

include $(ROOT)/gcc.mk

CXXFLAGS += -std=c++0x
CXXFLAGS += -std=c++0x