* [PATCH BlueZ] obexd: Fix compile error due to lack of header
@ 2017-10-26 6:05 ERAMOTO Masaya
2017-10-26 12:05 ` Luiz Augusto von Dentz
2017-10-26 12:39 ` Bastien Nocera
0 siblings, 2 replies; 7+ messages in thread
From: ERAMOTO Masaya @ 2017-10-26 6:05 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
When compiling with gcc 7.2.0, gcc outputs the following messages.
This patch adds the header stdlib.h to each obex-related header including
functions with the type ssize_t, so the same problem does not also happen
in case using there headers individually.
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);
^~~~~~~
size_t
./obexd/src/obex.h:45:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
ssize_t obex_get_apparam(struct obex_session *os, const uint8_t **buffer);
^~~~~~~
size_t
./obexd/src/obex.h:46:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
ssize_t obex_get_non_header_data(struct obex_session *os,
^~~~~~~
size_t
In file included from obexd/plugins/mas.c:43:0:
./obexd/src/mimetype.h:36:2: error: expected specifier-qualifier-list before ‘ssize_t’
ssize_t (*get_next_header)(void *object, void *buf, size_t mtu,
^~~~~~~
In file included from obexd/plugins/mas.c:46:0:
obexd/plugins/filesystem.h:24:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
ssize_t string_read(void *object, void *buf, size_t count);
^~~~~~~
size_t
---
obexd/plugins/filesystem.h | 2 ++
obexd/src/mimetype.h | 2 ++
obexd/src/obex.h | 2 ++
3 files changed, 6 insertions(+)
diff --git a/obexd/plugins/filesystem.h b/obexd/plugins/filesystem.h
index f95773beb..441b377a2 100644
--- a/obexd/plugins/filesystem.h
+++ b/obexd/plugins/filesystem.h
@@ -21,6 +21,8 @@
*
*/
+#include <stdlib.h>
+
ssize_t string_read(void *object, void *buf, size_t count);
gboolean is_filename(const char *name);
int verify_path(const char *path);
diff --git a/obexd/src/mimetype.h b/obexd/src/mimetype.h
index 79529b890..52b544073 100644
--- a/obexd/src/mimetype.h
+++ b/obexd/src/mimetype.h
@@ -21,6 +21,8 @@
*
*/
+#include <stdlib.h>
+
typedef gboolean (*obex_object_io_func) (void *object, int flags, int err,
void *user_data);
diff --git a/obexd/src/obex.h b/obexd/src/obex.h
index fc1674755..769bbcd8a 100644
--- a/obexd/src/obex.h
+++ b/obexd/src/obex.h
@@ -22,6 +22,8 @@
*
*/
+#include <stdlib.h>
+
#define OBJECT_SIZE_UNKNOWN -1
#define OBJECT_SIZE_DELETE -2
--
2.14.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH BlueZ] obexd: Fix compile error due to lack of header
2017-10-26 6:05 [PATCH BlueZ] obexd: Fix compile error due to lack of header ERAMOTO Masaya
@ 2017-10-26 12:05 ` Luiz Augusto von Dentz
2017-10-27 7:21 ` ERAMOTO Masaya
2017-11-02 14:13 ` Bastien Nocera
2017-10-26 12:39 ` Bastien Nocera
1 sibling, 2 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2017-10-26 12:05 UTC (permalink / raw)
To: ERAMOTO Masaya; +Cc: linux-bluetooth@vger.kernel.org
Hi Eramoto,
On Thu, Oct 26, 2017 at 9:05 AM, ERAMOTO Masaya
<eramoto.masaya@jp.fujitsu.com> wrote:
> When compiling with gcc 7.2.0, gcc outputs the following messages.
> This patch adds the header stdlib.h to each obex-related header including
> functions with the type ssize_t, so the same problem does not also happen
> in case using there headers individually.
Weird this is just happening now, so what did change in 7.2? Usually
we have stdlib.h included in the c file not in the header.
> 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);
> ^~~~~~~
> size_t
> ./obexd/src/obex.h:45: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_apparam(struct obex_session *os, const uint8_t **buff=
er);
> ^~~~~~~
> size_t
> ./obexd/src/obex.h:46: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_non_header_data(struct obex_session *os,
> ^~~~~~~
> size_t
> In file included from obexd/plugins/mas.c:43:0:
> ./obexd/src/mimetype.h:36:2: error: expected specifier-qualifier-list b=
efore =E2=80=98ssize_t=E2=80=99
> ssize_t (*get_next_header)(void *object, void *buf, size_t mtu,
> ^~~~~~~
> In file included from obexd/plugins/mas.c:46:0:
> obexd/plugins/filesystem.h:24:1: error: unknown type name =E2=80=98ssiz=
e_t=E2=80=99; did you mean =E2=80=98size_t=E2=80=99?
> ssize_t string_read(void *object, void *buf, size_t count);
> ^~~~~~~
> size_t
> ---
> obexd/plugins/filesystem.h | 2 ++
> obexd/src/mimetype.h | 2 ++
> obexd/src/obex.h | 2 ++
> 3 files changed, 6 insertions(+)
>
> diff --git a/obexd/plugins/filesystem.h b/obexd/plugins/filesystem.h
> index f95773beb..441b377a2 100644
> --- a/obexd/plugins/filesystem.h
> +++ b/obexd/plugins/filesystem.h
> @@ -21,6 +21,8 @@
> *
> */
>
> +#include <stdlib.h>
> +
> ssize_t string_read(void *object, void *buf, size_t count);
> gboolean is_filename(const char *name);
> int verify_path(const char *path);
> diff --git a/obexd/src/mimetype.h b/obexd/src/mimetype.h
> index 79529b890..52b544073 100644
> --- a/obexd/src/mimetype.h
> +++ b/obexd/src/mimetype.h
> @@ -21,6 +21,8 @@
> *
> */
>
> +#include <stdlib.h>
> +
> typedef gboolean (*obex_object_io_func) (void *object, int flags, int er=
r,
> void *user_data);
>
> diff --git a/obexd/src/obex.h b/obexd/src/obex.h
> index fc1674755..769bbcd8a 100644
> --- a/obexd/src/obex.h
> +++ b/obexd/src/obex.h
> @@ -22,6 +22,8 @@
> *
> */
>
> +#include <stdlib.h>
> +
> #define OBJECT_SIZE_UNKNOWN -1
> #define OBJECT_SIZE_DELETE -2
>
> --
> 2.14.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth=
" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--=20
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] obexd: Fix compile error due to lack of header
2017-10-26 12:05 ` Luiz Augusto von Dentz
@ 2017-10-27 7:21 ` ERAMOTO Masaya
2017-11-02 14:13 ` Bastien Nocera
1 sibling, 0 replies; 7+ messages in thread
From: ERAMOTO Masaya @ 2017-10-27 7:21 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth@vger.kernel.org
Hi Luiz,
On 10/26/2017 09:05 PM, Luiz Augusto von Dentz wrote:
> Hi Eramoto,
>
> On Thu, Oct 26, 2017 at 9:05 AM, ERAMOTO Masaya
> <eramoto.masaya@jp.fujitsu.com> wrote:
>> When compiling with gcc 7.2.0, gcc outputs the following messages.
>> This patch adds the header stdlib.h to each obex-related header including
>> functions with the type ssize_t, so the same problem does not also happen
>> in case using there headers individually.
>
> Weird this is just happening now, so what did change in 7.2? Usually
> we have stdlib.h included in the c file not in the header.
I do not know what change in gcc 7.2 triggers this issue since I have only
upgraded OS. obexd/plugins/mas.c does not always include stdlib.h, so I
guess gcc 7.2 has enhanced type checking in header file.
Regards,
Eramoto
>
>> 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);
>> ^~~~~~~
>> size_t
>> ./obexd/src/obex.h:45:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
>> ssize_t obex_get_apparam(struct obex_session *os, const uint8_t **buffer);
>> ^~~~~~~
>> size_t
>> ./obexd/src/obex.h:46:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
>> ssize_t obex_get_non_header_data(struct obex_session *os,
>> ^~~~~~~
>> size_t
>> In file included from obexd/plugins/mas.c:43:0:
>> ./obexd/src/mimetype.h:36:2: error: expected specifier-qualifier-list before ‘ssize_t’
>> ssize_t (*get_next_header)(void *object, void *buf, size_t mtu,
>> ^~~~~~~
>> In file included from obexd/plugins/mas.c:46:0:
>> obexd/plugins/filesystem.h:24:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
>> ssize_t string_read(void *object, void *buf, size_t count);
>> ^~~~~~~
>> size_t
>> ---
>> obexd/plugins/filesystem.h | 2 ++
>> obexd/src/mimetype.h | 2 ++
>> obexd/src/obex.h | 2 ++
>> 3 files changed, 6 insertions(+)
>>
>> diff --git a/obexd/plugins/filesystem.h b/obexd/plugins/filesystem.h
>> index f95773beb..441b377a2 100644
>> --- a/obexd/plugins/filesystem.h
>> +++ b/obexd/plugins/filesystem.h
>> @@ -21,6 +21,8 @@
>> *
>> */
>>
>> +#include <stdlib.h>
>> +
>> ssize_t string_read(void *object, void *buf, size_t count);
>> gboolean is_filename(const char *name);
>> int verify_path(const char *path);
>> diff --git a/obexd/src/mimetype.h b/obexd/src/mimetype.h
>> index 79529b890..52b544073 100644
>> --- a/obexd/src/mimetype.h
>> +++ b/obexd/src/mimetype.h
>> @@ -21,6 +21,8 @@
>> *
>> */
>>
>> +#include <stdlib.h>
>> +
>> typedef gboolean (*obex_object_io_func) (void *object, int flags, int err,
>> void *user_data);
>>
>> diff --git a/obexd/src/obex.h b/obexd/src/obex.h
>> index fc1674755..769bbcd8a 100644
>> --- a/obexd/src/obex.h
>> +++ b/obexd/src/obex.h
>> @@ -22,6 +22,8 @@
>> *
>> */
>>
>> +#include <stdlib.h>
>> +
>> #define OBJECT_SIZE_UNKNOWN -1
>> #define OBJECT_SIZE_DELETE -2
>>
>> --
>> 2.14.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] obexd: Fix compile error due to lack of header
2017-10-26 12:05 ` Luiz Augusto von Dentz
2017-10-27 7:21 ` ERAMOTO Masaya
@ 2017-11-02 14:13 ` Bastien Nocera
1 sibling, 0 replies; 7+ messages in thread
From: Bastien Nocera @ 2017-11-02 14:13 UTC (permalink / raw)
To: Luiz Augusto von Dentz, ERAMOTO Masaya; +Cc: linux-bluetooth@vger.kernel.org
On Thu, 2017-10-26 at 15:05 +0300, Luiz Augusto von Dentz wrote:
> Hi Eramoto,
>
> On Thu, Oct 26, 2017 at 9:05 AM, ERAMOTO Masaya
> <eramoto.masaya@jp.fujitsu.com> wrote:
> > When compiling with gcc 7.2.0, gcc outputs the following messages.
> > This patch adds the header stdlib.h to each obex-related header
> > including
> > functions with the type ssize_t, so the same problem does not also
> > happen
> > in case using there headers individually.
>
> Weird this is just happening now, so what did change in 7.2? Usually
> we have stdlib.h included in the c file not in the header.
It's not a gcc change, but a glibc change. See the patch labelled "Fix
compilation error on newer glibc" I just sent.
Cheers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] obexd: Fix compile error due to lack of header
2017-10-26 6:05 [PATCH BlueZ] obexd: Fix compile error due to lack of header ERAMOTO Masaya
2017-10-26 12:05 ` Luiz Augusto von Dentz
@ 2017-10-26 12:39 ` Bastien Nocera
2017-10-27 7:55 ` ERAMOTO Masaya
1 sibling, 1 reply; 7+ messages in thread
From: Bastien Nocera @ 2017-10-26 12:39 UTC (permalink / raw)
To: ERAMOTO Masaya, linux-bluetooth@vger.kernel.org
On Thu, 2017-10-26 at 15:05 +0900, ERAMOTO Masaya wrote:
> When compiling with gcc 7.2.0, gcc outputs the following messages.
> This patch adds the header stdlib.h to each obex-related header
> including
> functions with the type ssize_t, so the same problem does not also
> happen
> in case using there headers individually.
I already sent a patch for this about 2 months ago, look for "obexd:
Fix compilation error on F27"
Cheers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] obexd: Fix compile error due to lack of header
2017-10-26 12:39 ` Bastien Nocera
@ 2017-10-27 7:55 ` ERAMOTO Masaya
2017-10-27 11:29 ` Bastien Nocera
0 siblings, 1 reply; 7+ messages in thread
From: ERAMOTO Masaya @ 2017-10-27 7:55 UTC (permalink / raw)
To: Bastien Nocera, linux-bluetooth@vger.kernel.org
Hi Bastien,
On 10/26/2017 09:39 PM, Bastien Nocera wrote:
> On Thu, 2017-10-26 at 15:05 +0900, ERAMOTO Masaya wrote:
>> When compiling with gcc 7.2.0, gcc outputs the following messages.
>> This patch adds the header stdlib.h to each obex-related header
>> including
>> functions with the type ssize_t, so the same problem does not also
>> happen
>> in case using there headers individually.
>
> I already sent a patch for this about 2 months ago, look for "obexd:
> Fix compilation error on F27"
Sorry for I had missed this patch.
Now, it seems that you are blocking the patch set including this patch
due to that Florian commented about one of the patch set. Is there any
upgrades for the patch set?
Regards,
Eramoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] obexd: Fix compile error due to lack of header
2017-10-27 7:55 ` ERAMOTO Masaya
@ 2017-10-27 11:29 ` Bastien Nocera
0 siblings, 0 replies; 7+ messages in thread
From: Bastien Nocera @ 2017-10-27 11:29 UTC (permalink / raw)
To: ERAMOTO Masaya, linux-bluetooth@vger.kernel.org
On Fri, 2017-10-27 at 16:55 +0900, ERAMOTO Masaya wrote:
> Hi Bastien,
>
> On 10/26/2017 09:39 PM, Bastien Nocera wrote:
> > On Thu, 2017-10-26 at 15:05 +0900, ERAMOTO Masaya wrote:
> > > When compiling with gcc 7.2.0, gcc outputs the following
> > > messages.
> > > This patch adds the header stdlib.h to each obex-related header
> > > including
> > > functions with the type ssize_t, so the same problem does not
> > > also
> > > happen
> > > in case using there headers individually.
> >
> > I already sent a patch for this about 2 months ago, look for
> > "obexd:
> > Fix compilation error on F27"
>
> Sorry for I had missed this patch.
>
> Now, it seems that you are blocking the patch set including this
> patch
> due to that Florian commented about one of the patch set.
I'm not blocking anything, it didn't get reviewed at all.
> Is there any
> upgrades for the patch set?
The patch set is just a bunch of unrelated fixes, the patches can be
committed individually.
I think one of us needs to figure out what the change is to put the
justification in the commit message before that's going to be accepted
though.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-11-02 14:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-26 6:05 [PATCH BlueZ] obexd: Fix compile error due to lack of header ERAMOTO Masaya
2017-10-26 12:05 ` Luiz Augusto von Dentz
2017-10-27 7:21 ` ERAMOTO Masaya
2017-11-02 14:13 ` Bastien Nocera
2017-10-26 12:39 ` Bastien Nocera
2017-10-27 7:55 ` ERAMOTO Masaya
2017-10-27 11:29 ` Bastien Nocera
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).