linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] obexd: Fix compilation error on newer glibc
@ 2017-11-02 14:11 Bastien Nocera
  2017-11-03 11:22 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2017-11-02 14:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Bastien Nocera

Since this glibc commit:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37f802f86400684c8d13403958b2c598721d6360

glibc doesn't include declare ssize_t when fcntl.h is included (fcntl.h
included <bits/uio.h> which includes <sys/types.h>).

This fixes the following compile-time error:

In file included from obexd/plugins/mas.c:41:0:
./obexd/src/obex.h:37:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
 ssize_t obex_get_size(struct obex_session *os);
 ^~~~~~~
---
 obexd/src/obex.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/obexd/src/obex.h b/obexd/src/obex.h
index fc1674755..67593f11b 100644
--- a/obexd/src/obex.h
+++ b/obexd/src/obex.h
@@ -22,6 +22,8 @@
  *
  */
 
+#include <unistd.h>
+
 #define OBJECT_SIZE_UNKNOWN -1
 #define OBJECT_SIZE_DELETE -2
 
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] obexd: Fix compilation error on newer glibc
  2017-11-02 14:11 [PATCH] obexd: Fix compilation error on newer glibc Bastien Nocera
@ 2017-11-03 11:22 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2017-11-03 11:22 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-bluetooth@vger.kernel.org

Hi Bastien,

On Thu, Nov 2, 2017 at 4:11 PM, Bastien Nocera <hadess@hadess.net> wrote:
> Since this glibc commit:
> https://sourceware.org/git/gitweb.cgi?p=3Dglibc.git;a=3Dcommitdiff;h=3D37=
f802f86400684c8d13403958b2c598721d6360
>
> glibc doesn't include declare ssize_t when fcntl.h is included (fcntl.h
> included <bits/uio.h> which includes <sys/types.h>).
>
> This fixes the following compile-time error:
>
> In file included from obexd/plugins/mas.c:41:0:
> ./obexd/src/obex.h:37:1: error: unknown type name =E2=80=98ssize_t=E2=80=
=99; did you mean =E2=80=98size_t=E2=80=99?
>  ssize_t obex_get_size(struct obex_session *os);
>  ^~~~~~~
> ---
>  obexd/src/obex.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/obexd/src/obex.h b/obexd/src/obex.h
> index fc1674755..67593f11b 100644
> --- a/obexd/src/obex.h
> +++ b/obexd/src/obex.h
> @@ -22,6 +22,8 @@
>   *
>   */
>
> +#include <unistd.h>
> +
>  #define OBJECT_SIZE_UNKNOWN -1
>  #define OBJECT_SIZE_DELETE -2
>
> --
> 2.14.3

Applied, thanks.

--=20
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-03 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-02 14:11 [PATCH] obexd: Fix compilation error on newer glibc Bastien Nocera
2017-11-03 11:22 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).