Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
7c2ca893
Commit
7c2ca893
authored
Jun 28, 2016
by
Ghislain MARY
Browse files
Fix build for bb10.
parent
b6a9549f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
7c2ca893
...
...
@@ -20,6 +20,16 @@
#
############################################################################
function
(
require_c99 target
)
message
(
"CMAKE_C_COMPILER_ID:
${
CMAKE_C_COMPILER_ID
}
"
)
if
(
CMAKE_C_COMPILER_ID STREQUAL
"QCC"
)
target_compile_options
(
${
target
}
PRIVATE
"-std=gnu99"
)
else
()
set_property
(
TARGET
${
target
}
PROPERTY C_STANDARD 99
)
set_property
(
TARGET
${
target
}
PROPERTY C_STANDARD_REQUIRED TRUE
)
endif
()
endfunction
()
set
(
INCLUDES
${
ANTLR3C_INCLUDE_DIRS
}
)
set
(
LIBS
${
ANTLR3C_LIBRARIES
}
)
...
...
@@ -175,8 +185,7 @@ if(ENABLE_STATIC)
if
(
NOT
"
${
LINK_FLAGS_STR
}
"
STREQUAL
""
)
set_target_properties
(
bellesip-static PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS_STR
}
"
)
endif
()
set_property
(
TARGET bellesip-static PROPERTY C_STANDARD 99
)
set_property
(
TARGET bellesip-static PROPERTY C_STANDARD_REQUIRED TRUE
)
require_c99
(
bellesip-static
)
install
(
TARGETS bellesip-static EXPORT
${
EXPORT_TARGETS_NAME
}
Targets
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
...
...
@@ -191,8 +200,7 @@ if(ENABLE_SHARED)
if
(
NOT
"
${
LINK_FLAGS_STR
}
"
STREQUAL
""
)
set_target_properties
(
bellesip PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS_STR
}
"
)
endif
()
set_property
(
TARGET bellesip PROPERTY C_STANDARD 99
)
set_property
(
TARGET bellesip PROPERTY C_STANDARD_REQUIRED TRUE
)
require_c99
(
bellesip
)
if
(
MSVC
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
OR CMAKE_BUILD_TYPE STREQUAL
"RelWithDebInfo"
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_BUILD_TYPE
}
/bellesip.pdb
...
...
src/dns.c
View file @
7c2ca893
...
...
@@ -8007,11 +8007,15 @@ int dns_res_check(struct dns_resolver *R) {
struct
dns_packet
*
dns_res_fetch
(
struct
dns_resolver
*
R
,
int
*
error
)
{
struct
dns_packet
*
P
=
NULL
;
if
(
R
->
stack
[
0
].
state
!=
DNS_R_DONE
)
return
*
error
=
DNS_EUNKNOWN
,
NULL
;
if
(
R
->
stack
[
0
].
state
!=
DNS_R_DONE
)
{
*
error
=
DNS_EUNKNOWN
;
return
NULL
;
}
if
(
!
dns_p_movptr
(
&
P
,
&
R
->
stack
[
0
].
answer
))
return
*
error
=
DNS_EFETCHED
,
NULL
;
if
(
!
dns_p_movptr
(
&
P
,
&
R
->
stack
[
0
].
answer
))
{
*
error
=
DNS_EFETCHED
;
return
NULL
;
}
return
P
;
}
/* dns_res_fetch() */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment