Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls_socket: add #pragma once to avoid redefinition #42

Merged
merged 1 commit into from
Aug 7, 2019

Conversation

binarytrails
Copy link
Contributor

No description provided.

@binarytrails
Copy link
Contributor Author

binarytrails commented Aug 7, 2019

HTTP client includes impl/tls_socket.hpp and the server creates a router with default_tls_traits_t from tls.hpp but the server includes the http.h (client) to perform a client request to send push notifications to android device on a subscribe api entry. This PR fixes this:

In file included from /usr/include/restinio/tls.hpp:12,
                 from /home/n0t/jami/opendht/include/opendht/dht_proxy_server.h:38,
                 from /home/n0t/jami/opendht/include/opendht.h:23,
                 from /home/n0t/jami/opendht/include/opendht/http.h:29,
                 from /home/n0t/jami/opendht/include/opendht/dht_proxy_client.h:34,
                 from /home/n0t/jami/opendht/src/dhtrunner.cpp:27:
/usr/include/restinio/impl/tls_socket.hpp:34:7: error: redefinition of ‘class restinio::impl::tls_socket_t’
   34 | class tls_socket_t
      |       ^~~~~~~~~~~~
In file included from /home/n0t/jami/opendht/include/opendht/http.h:28,
                 from /home/n0t/jami/opendht/include/opendht/dht_proxy_client.h:34,
                 from /home/n0t/jami/opendht/src/dhtrunner.cpp:27:
/usr/include/restinio/impl/tls_socket.hpp:34:7: note: previous definition of ‘class restinio::impl::tls_socket_t’
   34 | class tls_socket_t
      |       ^~~~~~~~~~~~
In file included from /home/n0t/jami/opendht/include/opendht.h:23,
                 from /home/n0t/jami/opendht/include/opendht/http.h:29,
                 from /home/n0t/jami/opendht/include/opendht/dht_proxy_client.h:34,
                 from /home/n0t/jami/opendht/src/dhtrunner.cpp:27:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants