Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1] Fix FreeBSD build
@ 2019-05-31 11:07 Alexander V. Tikhonov
  2019-05-31 11:20 ` Vladimir Davydov
  2019-06-05 11:23 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander V. Tikhonov @ 2019-05-31 11:07 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: Alexander V. Tikhonov, tarantool-patches

Fixed swim headers in addition to commits:
88892f13a3934c72721e6240bfa5fe174d62d99b

Closes #4050
---

Travis-ci: https://travis-ci.org/tarantool/tarantool/builds/539652447
Issue: https://github.com/tarantool/tarantool/issues/4050

 src/lib/swim/swim_proto.h     | 3 ++-
 src/lib/swim/swim_transport.h | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/swim/swim_proto.h b/src/lib/swim/swim_proto.h
index 482d79fb1..5275d4e7e 100644
--- a/src/lib/swim/swim_proto.h
+++ b/src/lib/swim/swim_proto.h
@@ -33,8 +33,9 @@
 #include "tt_static.h"
 #include "uuid/tt_uuid.h"
 #include <arpa/inet.h>
-#include <netinet/in.h>
 #include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
 #include <stdbool.h>
 #include "swim_constants.h"
 
diff --git a/src/lib/swim/swim_transport.h b/src/lib/swim/swim_transport.h
index c4e48cdeb..137c73212 100644
--- a/src/lib/swim/swim_transport.h
+++ b/src/lib/swim/swim_transport.h
@@ -32,6 +32,10 @@
  */
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
 
 struct ifaddrs;
 
-- 
2.17.1

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

* Re: [tarantool-patches] [PATCH v1] Fix FreeBSD build
  2019-05-31 11:07 [tarantool-patches] [PATCH v1] Fix FreeBSD build Alexander V. Tikhonov
@ 2019-05-31 11:20 ` Vladimir Davydov
  2019-05-31 12:42   ` Re[2]: " Alexander Tikhonov
  2019-06-05 11:23 ` [tarantool-patches] " Alexander Turenko
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Davydov @ 2019-05-31 11:20 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: Alexander Turenko, tarantool-patches

On Fri, May 31, 2019 at 02:07:06PM +0300, Alexander V. Tikhonov wrote:
> Fixed swim headers in addition to commits:
> 88892f13a3934c72721e6240bfa5fe174d62d99b
> 
> Closes #4050
> ---
> 
> Travis-ci: https://travis-ci.org/tarantool/tarantool/builds/539652447
> Issue: https://github.com/tarantool/tarantool/issues/4050
> 
>  src/lib/swim/swim_proto.h     | 3 ++-
>  src/lib/swim/swim_transport.h | 4 ++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lib/swim/swim_proto.h b/src/lib/swim/swim_proto.h
> index 482d79fb1..5275d4e7e 100644
> --- a/src/lib/swim/swim_proto.h
> +++ b/src/lib/swim/swim_proto.h
> @@ -33,8 +33,9 @@
>  #include "tt_static.h"
>  #include "uuid/tt_uuid.h"
>  #include <arpa/inet.h>
> -#include <netinet/in.h>
>  #include <sys/socket.h>
> +#include <netinet/in.h>
> +#include <netinet/ip.h>
>  #include <stdbool.h>
>  #include "swim_constants.h"
>  
> diff --git a/src/lib/swim/swim_transport.h b/src/lib/swim/swim_transport.h
> index c4e48cdeb..137c73212 100644
> --- a/src/lib/swim/swim_transport.h
> +++ b/src/lib/swim/swim_transport.h
> @@ -32,6 +32,10 @@
>   */
>  #include <netinet/in.h>
>  #include <arpa/inet.h>
> +#include <unistd.h>
> +#include <sys/socket.h>
> +#include <netinet/in.h>
> +#include <netinet/ip.h>
>  
>  struct ifaddrs;
>  

You've just pushed and immediately reverted it. What's going on?

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

* Re[2]: [tarantool-patches] [PATCH v1] Fix FreeBSD build
  2019-05-31 11:20 ` Vladimir Davydov
@ 2019-05-31 12:42   ` Alexander Tikhonov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Tikhonov @ 2019-05-31 12:42 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Alexander Turenko, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]


Mistakenly pushed to the wrong branch in the middle of the fix.

Пятница, 31 мая 2019, 14:20 +03:00 от Vladimir Davydov <vdavydov.dev@gmail.com>:
>
>On Fri, May 31, 2019 at 02:07:06PM +0300, Alexander V. Tikhonov wrote:
>> Fixed swim headers in addition to commits:
>> 88892f13a3934c72721e6240bfa5fe174d62d99b
>> 
>> Closes #4050
>> ---
>> 
>> Travis-ci:  https://travis-ci.org/tarantool/tarantool/builds/539652447
>> Issue:  https://github.com/tarantool/tarantool/issues/4050
>> 
>>  src/lib/swim/swim_proto.h     | 3 ++-
>>  src/lib/swim/swim_transport.h | 4 ++++
>>  2 files changed, 6 insertions(+), 1 deletion(-)
>> 
>> diff --git a/src/lib/swim/swim_proto.h b/src/lib/swim/swim_proto.h
>> index 482d79fb1..5275d4e7e 100644
>> --- a/src/lib/swim/swim_proto.h
>> +++ b/src/lib/swim/swim_proto.h
>> @@ -33,8 +33,9 @@
>>  #include "tt_static.h"
>>  #include "uuid/tt_uuid.h"
>>  #include <arpa/inet.h>
>> -#include <netinet/in.h>
>>  #include <sys/socket.h>
>> +#include <netinet/in.h>
>> +#include <netinet/ip.h>
>>  #include <stdbool.h>
>>  #include "swim_constants.h"
>> 
>> diff --git a/src/lib/swim/swim_transport.h b/src/lib/swim/swim_transport.h
>> index c4e48cdeb..137c73212 100644
>> --- a/src/lib/swim/swim_transport.h
>> +++ b/src/lib/swim/swim_transport.h
>> @@ -32,6 +32,10 @@
>>   */
>>  #include <netinet/in.h>
>>  #include <arpa/inet.h>
>> +#include <unistd.h>
>> +#include <sys/socket.h>
>> +#include <netinet/in.h>
>> +#include <netinet/ip.h>
>> 
>>  struct ifaddrs;
>> 
>
>You've just pushed and immediately reverted it. What's going on?


-- 
Alexander Tikhonov

[-- Attachment #2: Type: text/html, Size: 2562 bytes --]

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

* [tarantool-patches] Re: [PATCH v1] Fix FreeBSD build
  2019-05-31 11:07 [tarantool-patches] [PATCH v1] Fix FreeBSD build Alexander V. Tikhonov
  2019-05-31 11:20 ` Vladimir Davydov
@ 2019-06-05 11:23 ` Alexander Turenko
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Turenko @ 2019-06-05 11:23 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches, Vladislav Shpilevoy

CCed Vlad.

On Fri, May 31, 2019 at 02:07:06PM +0300, Alexander V. Tikhonov wrote:
> Fixed swim headers in addition to commits:
> 88892f13a3934c72721e6240bfa5fe174d62d99b

Please, add a commit header too, like
0000000000000000000000000000000000000000 ('commit header here').

> 
> Closes #4050
> ---
> 
> Travis-ci: https://travis-ci.org/tarantool/tarantool/builds/539652447
> Issue: https://github.com/tarantool/tarantool/issues/4050
> 
>  src/lib/swim/swim_proto.h     | 3 ++-
>  src/lib/swim/swim_transport.h | 4 ++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lib/swim/swim_proto.h b/src/lib/swim/swim_proto.h
> index 482d79fb1..5275d4e7e 100644
> --- a/src/lib/swim/swim_proto.h
> +++ b/src/lib/swim/swim_proto.h
> @@ -33,8 +33,9 @@
>  #include "tt_static.h"
>  #include "uuid/tt_uuid.h"
>  #include <arpa/inet.h>
> -#include <netinet/in.h>
>  #include <sys/socket.h>
> +#include <netinet/in.h>
> +#include <netinet/ip.h>
>  #include <stdbool.h>
>  #include "swim_constants.h"

I guess here the problem only in <struct sockaddr_in>, so please check
where it is really defined and leave only needed header.

Also I suggest to mark #include directive in the following way:

#include <foo.h> /* struct foo */

>  
> diff --git a/src/lib/swim/swim_transport.h b/src/lib/swim/swim_transport.h
> index c4e48cdeb..137c73212 100644
> --- a/src/lib/swim/swim_transport.h
> +++ b/src/lib/swim/swim_transport.h
> @@ -32,6 +32,10 @@
>   */
>  #include <netinet/in.h>
>  #include <arpa/inet.h>
> +#include <unistd.h>
> +#include <sys/socket.h>
> +#include <netinet/in.h>
> +#include <netinet/ip.h>

Are we really need all those headers for <struct sockaddr_in>? I would
declare <struct sockaddr> as we do for <struct ifaddrs>, because we
don't need to know a size of the structure (it only used by a pointer).

So, add

```
struct sockaddr;
```

And check where <struct sockaddr_in> is defined on FreeBSD and add only
this specific header.

If there are problems in the corresponding C file, let's fix them in the
C file.

>  
>  struct ifaddrs;
>  
> -- 
> 2.17.1
> 

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

end of thread, other threads:[~2019-06-05 11:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 11:07 [tarantool-patches] [PATCH v1] Fix FreeBSD build Alexander V. Tikhonov
2019-05-31 11:20 ` Vladimir Davydov
2019-05-31 12:42   ` Re[2]: " Alexander Tikhonov
2019-06-05 11:23 ` [tarantool-patches] " Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox