{"action":"created","issue":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/599","repository_url":"https://api.github.com/repos/espressif/esp-idf","labels_url":"https://api.github.com/repos/espressif/esp-idf/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/espressif/esp-idf/issues/599/comments","events_url":"https://api.github.com/repos/espressif/esp-idf/issues/599/events","html_url":"https://github.com/espressif/esp-idf/issues/599","id":228533010,"number":599,"title":"<sys/time.h> implicit declaration of function 'timeradd'","user":{"login":"Beck-Sisyphus","id":5952569,"avatar_url":"https://avatars1.githubusercontent.com/u/5952569?v=3","gravatar_id":"","url":"https://api.github.com/users/Beck-Sisyphus","html_url":"https://github.com/Beck-Sisyphus","followers_url":"https://api.github.com/users/Beck-Sisyphus/followers","following_url":"https://api.github.com/users/Beck-Sisyphus/following{/other_user}","gists_url":"https://api.github.com/users/Beck-Sisyphus/gists{/gist_id}","starred_url":"https://api.github.com/users/Beck-Sisyphus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Beck-Sisyphus/subscriptions","organizations_url":"https://api.github.com/users/Beck-Sisyphus/orgs","repos_url":"https://api.github.com/users/Beck-Sisyphus/repos","events_url":"https://api.github.com/users/Beck-Sisyphus/events{/privacy}","received_events_url":"https://api.github.com/users/Beck-Sisyphus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-14T10:40:46Z","updated_at":"2017-05-14T11:55:01Z","closed_at":"2017-05-14T11:13:26Z","body":"Hi espressif,\r\n\r\n\r\nIn recent development on system time, I used Linux similar command for struct timeval, but get the following error.\r\n\r\n\r\n> error: implicit declaration of function 'timeradd' [-Werror=implicit-function-declaration]\r\n     timeradd(t_start, timeout, t_timeout);\r\n\r\n\r\nMy program looks like:\r\n\r\n\r\n    #include <sys/time.h>\r\n\r\n    struct timeval t_start;\r\n    gettimeofday(&t_start, NULL);\r\n    struct timeval timeout = { .tv_sec = 30, .tv_usec = 0,};\r\n    struct timeval t_timeout;\r\n    timeradd(t_start, timeout, t_timeout);\r\n\r\nI have found the library at esp-idf/components/newlib/include/sys/time.h, and timeval works fine. \r\n\r\n\r\nThanks,\r\n\r\nBeck\r\n"},"comment":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/comments/301307273","html_url":"https://github.com/espressif/esp-idf/issues/599#issuecomment-301307273","issue_url":"https://api.github.com/repos/espressif/esp-idf/issues/599","id":301307273,"user":{"login":"Beck-Sisyphus","id":5952569,"avatar_url":"https://avatars1.githubusercontent.com/u/5952569?v=3","gravatar_id":"","url":"https://api.github.com/users/Beck-Sisyphus","html_url":"https://github.com/Beck-Sisyphus","followers_url":"https://api.github.com/users/Beck-Sisyphus/followers","following_url":"https://api.github.com/users/Beck-Sisyphus/following{/other_user}","gists_url":"https://api.github.com/users/Beck-Sisyphus/gists{/gist_id}","starred_url":"https://api.github.com/users/Beck-Sisyphus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Beck-Sisyphus/subscriptions","organizations_url":"https://api.github.com/users/Beck-Sisyphus/orgs","repos_url":"https://api.github.com/users/Beck-Sisyphus/repos","events_url":"https://api.github.com/users/Beck-Sisyphus/events{/privacy}","received_events_url":"https://api.github.com/users/Beck-Sisyphus/received_events","type":"User","site_admin":false},"created_at":"2017-05-14T11:55:01Z","updated_at":"2017-05-14T11:55:01Z","body":"void * memset ( void * ptr, int value, size_t num ); in #include <stdio.h> also give me\r\n implicit declaration of function"}}
{"actor":{"display_login":"Beck-Sisyphus"}}