Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Philipp Klaus Krause Newsgroups: comp.os.linux.development.apps Subject: =?UTF-8?Q?Re:_warning:_implicit_declaration_of_function_=e2=80=98mk?= =?UTF-8?B?c3RlbXDigJk=?= Date: Thu, 3 Aug 2017 12:30:03 +0200 Organization: solani.org Lines: 21 Message-ID: References: <87ini50xrp.fsf@LkoBDZeT.terraraq.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1501756204 4953 eJwNyMEBwCAIA8CVREiEdQpm/xHsPQ9OY58gGBB0bw1P5uxC9/7Qf8vL0yg3cnlq3ZFPWCMfHg4Q7g== (3 Aug 2017 10:30:04 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 3 Aug 2017 10:30:04 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 X-User-ID: eJwFwYEBgDAIA7CXJtAOzgGx/59gAufD9wbBgCBpoTpjbvysyxBd5CLMKqdnc+92oj11hB8gERFB Cancel-Lock: sha1:mH+/SBJNz8v1JxdoiKlyGjBngZ0= In-Reply-To: <87ini50xrp.fsf@LkoBDZeT.terraraq.uk> Content-Language: en-US X-NNTP-Posting-Host: eJwFwYEBwCAIA7CXhtBqz0GE/09YAqexdhAMDObMtVZkBaS3Cg5WrVL22g3KI11XH82e8/wfwBC1 Xref: csiph.com comp.os.linux.development.apps:847 Am 03.08.2017 um 12:08 schrieb Richard Kettlewell: > Philipp Klaus Krause writes: >> When using mkstemp() in my C source, I get the gcc warning: >> >> warning: implicit declaration of function ‘mkstemp’ >> >> Why? >> I use gcc 6.4.0 on a debian GNU/Linux system. >> is included. I use other POSIX functions (such as >> ftruncate() and open()) that are not part of ISO C in the same source >> file, but get a warning for mkstemp() only. >> I tried using -D_POSIX_C_SOURCE=200112L, but still get the warning. > > WFM on an up-to-date sid install. What’s your test case? > Sorry for the noise. I just checked again, and I mistook the include for earlier. With the correct include, the warning is gone. Philipp