[PATCH v2 1/7] common: add scoped_fd
Yao Qi
qiyaoltc@gmail.com
Tue Feb 13 16:48:00 GMT 2018
On Fri, Jan 26, 2018 at 2:14 PM, Markus Metzger
<markus.t.metzger@intel.com> wrote:
> +
> +/* Test that the file descriptor is closed. */
> +static void
> +test_destroy ()
> +{
> + char filename[] = "scoped_fd-selftest-XXXXXX";
> + int fd = mkstemp (filename);
> + SELF_CHECK (fd >= 0);
Hi Markus,
I failed to build this file with i686-w64-mingw32-g++ 4.8.2, shipped
in Ubuntu 14.04.
gdb/unittests/scoped_fd-selftests.c:37:29: error: ‘mkstemp’ was not
declared in this scope
int fd = mkstemp (filename);
^
gdb/unittests/scoped_fd-selftests.c: In function ‘void
selftests::scoped_fd::test_release()’:
gdb/unittests/scoped_fd-selftests.c:56:29: error: ‘mkstemp’ was not
declared in this scope
int fd = mkstemp (filename);
^
There is no such error with i686-w64-mingw32-g++ 5.3.1. Can we use
"open" instead?
--
Yao (齐尧)
More information about the Gdb-patches
mailing list