<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Redefinition of struct timeval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47085/redefinition-of-struct-timeval</link><description>\components\iot\socket\api\socket_api.h contains a definition for &amp;#39;struct timeval&amp;#39; that conflicts with \arm-eabi\sys-include\sys\_timeval.h 
 It creates a conflict with including \arm-eabi\sys-include\sys\time.h: 
 
 \arm-eabi\sys-include\sys\time.h </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 May 2019 04:04:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47085/redefinition-of-struct-timeval" /><item><title>RE: Redefinition of struct timeval</title><link>https://devzone.nordicsemi.com/thread/186050?ContentTypeID=1</link><pubDate>Thu, 09 May 2019 04:04:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69186586-a7ab-4c0d-a923-896224bd4a05</guid><dc:creator>Alexander2</dc:creator><description>&lt;p&gt;I reproduced this error. I&amp;#39;m not sure why timeval is duplicated in the SDK, but the error has gone when I commented the first line in my example. Another trick to avoid this error - include&amp;nbsp;sys/time.h after SDK&amp;#39;s headers and specify&amp;nbsp;-D_TIMEVAL_DEFINED&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// #include &amp;lt;sys/time.h&amp;gt;

#include &amp;lt;sys/socket.h&amp;gt;
#include &amp;lt;netinet/in.h&amp;gt;
#include &amp;lt;arpa/inet.h&amp;gt;

void foo()
{
    struct timeval tv;
    select(0, 0, 0, 0, &amp;amp;tv);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>