Fix: use sys/types.h for ssize_t on Cygwin
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 21 Jul 2020 15:00:40 +0000 (11:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 21 Jul 2020 19:21:01 +0000 (15:21 -0400)
Observed issue
==============

On cygwin worker:
  In file included from snapshot.c:10:
  ../../src/common/snapshot.h:33:1: error: unknown type name `ssize_t`; did you mean `_ssize_t`?
     33 | ssize_t lttng_snapshot_output_create_from_buffer(
        | ^~~~~~~
        | _ssize_t
  snapshot.c:128:9: error: conflicting types for `lttng_snapshot_output_create_from_buffer`
    128 | ssize_t lttng_snapshot_output_create_from_buffer(
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from snapshot.c:10:
  ../../src/common/snapshot.h:33:9: note: previous declaration of `lttng_snapshot_output_create_from_buffer` was here
     33 | ssize_t lttng_snapshot_output_create_from_buffer(
        |

Solution
========

Include sys/types.h.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1df58ffb6df02d6957e1e4eac6ebfb297f3e3bb0

src/common/snapshot.h

index 58e855767ad0e33c17a9dba9831a026e4a527a6d..df02adaf917156c4a242f783909e1e172ee0dd73 100644 (file)
@@ -11,6 +11,7 @@
 #include <common/macros.h>
 
 #include <stdbool.h>
+#include <sys/types.h>
 
 struct lttng_payload_view;
 struct lttng_payload;
This page took 0.026047 seconds and 5 git commands to generate.