This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

integrating httpsget sample with http server sample

Hello, 

I'm trying to integrate httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT with the http server example but i'm getting the following errors.and the modified sample is attached also.

Description Resource Path Location Type
#102 "addrinfo" has already been declared in the current scope .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 50, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\nettools\inc\inet.h C/C++ Problem
#102 "IP6N" has already been declared in the current scope .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 62, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\usertype.h C/C++ Problem
#148 declaration is incompatible with "int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **)" (declared at line 61 of "C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd/netdb.h") .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 66, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\nettools\inc\inet.h C/C++ Problem
#148 declaration is incompatible with "void freeaddrinfo(struct addrinfo *)" (declared at line 63 of "C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd/netdb.h") .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 68, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\nettools\inc\inet.h C/C++ Problem
#249 function "accept" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 125, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "bind" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 133, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "connect" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 141, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "FD_CLR" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 83, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "FD_COPY" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 117, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "FD_ISSET" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 94, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "FD_SET" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 105, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "FD_ZERO" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 72, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "getpeername" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 149, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "getsockname" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 166, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "getsockopt" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 174, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "listen" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 183, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "recv" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 191, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "recvfrom" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 199, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "send" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 233, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "sendto" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 241, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "setsockopt" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 266, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "shutdown" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 275, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#249 function "socket" has already been defined .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 283, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\socket.h C/C++ Problem
#258 invalid redeclaration of type name "IP6N" (declared at line 93 of "C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd/sys/socket.h") .ccsproject /httpsget_EK_TM4C129EXL_TI_TivaTM4C129ENCPDT line 70, external location: C:\ti\tirtos_tivac_2_16_00_08\products\ndk_2_25_00_09\packages\ti\ndk\inc\usertype.h C/C++ Problem

i know it is a linking problem, please advise.

Thanks,

Mohammed Fawzy

7026.httpsget.zip

  • Hi Mohammed sorry for the late reply,

    What you're doing is possible but you need to keep the BSD and legacy NDK API's separate from each other. This means creating a separate .c file and placing your respective hooks in there rather than in the httpsget.c file.

    For more information on this issue you can reference section 3.3.1.1 "Things to Remember About BSD Compatibility" within the NDK API reference guide(spru524.pdf).

    Best,
    Alexander