<?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>Compile error in Zephyr, can not find c funtion even include the head files</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108075/compile-error-in-zephyr-can-not-find-c-funtion-even-include-the-head-files</link><description>Hi Support team, 
 I&amp;#39;m compiling some c code with ncs v2.5.1, the include files are: 
 
 #include &amp;lt;time.h&amp;gt; 
 #include &amp;lt;sys/time.h&amp;gt; 
 
 
 #include &amp;lt;stdio.h&amp;gt; 
 #include &amp;lt;stdlib.h&amp;gt; 
 #include &amp;lt;stdbool.h&amp;gt; 
 
 But there are some compiling errors: 
 
 (1) </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Feb 2024 08:55:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108075/compile-error-in-zephyr-can-not-find-c-funtion-even-include-the-head-files" /><item><title>RE: Compile error in Zephyr, can not find c funtion even include the head files</title><link>https://devzone.nordicsemi.com/thread/467696?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 08:55:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8680d8a5-d11c-4c36-93e8-96eace0601ba</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Update: When I config &amp;#39;&lt;span&gt;CONFIG_POSIX_API&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&amp;#39;, the error of&amp;nbsp;&lt;span&gt;clock_gettime() disappeared.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But the errors of strdup and&amp;nbsp;strndup still there. I found there is a&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/22491"&gt;Issue 22464 strdup function added to minimal C library #22491&lt;/a&gt;&amp;nbsp;and said the strdup was added into Zephyr. I&amp;#39;m using&amp;nbsp;ncs v2.5.1, should I add some configuration for this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>