On Thu, Apr 29, 2021 at 7:04 PM Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > On Thu, Apr 29, 2021 at 08:03:01PM +0300, Andy Shevchenko wrote: > > On Thu, Apr 29, 2021 at 08:00:14PM +0300, Andy Shevchenko wrote: > > > On Thu, Apr 29, 2021 at 03:07:49PM +0200, Bartosz Golaszewski wrote: > > ... > > > > Still you may advance the pointer by the length of P_tmpdir + 1. > > > > There is also tempnam(). > > Scratch it. It seems legacy one that actually tries to create file... > > -- > With Best Regards, > Andy Shevchenko > > And also this: libgpiod/tests/gpiosim/gpiosim.c:331: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' So I'll go with my solution. Bart