[Spice-devel] [PATCH spice-server 1/2] websocket: Add header guards

Frediano Ziglio fziglio at redhat.com
Thu Jun 27 15:03:57 UTC 2019


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/websocket.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/websocket.h b/server/websocket.h
index 22120d939..7707e6804 100644
--- a/server/websocket.h
+++ b/server/websocket.h
@@ -15,6 +15,9 @@
  *  License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef WEBSOCKET_H_
+#define WEBSOCKET_H_
+
 typedef ssize_t (*websocket_read_cb_t)(void *opaque, void *buf, size_t nbyte);
 typedef ssize_t (*websocket_write_cb_t)(void *opaque, const void *buf, size_t nbyte);
 typedef ssize_t (*websocket_writev_cb_t)(void *opaque, struct iovec *iov, int iovcnt);
@@ -41,3 +44,5 @@ void websocket_free(RedsWebSocket *ws);
 int websocket_read(RedsWebSocket *ws, uint8_t *buf, size_t len, unsigned *flags);
 int websocket_write(RedsWebSocket *ws, const void *buf, size_t len, unsigned flags);
 int websocket_writev(RedsWebSocket *ws, const struct iovec *iov, int iovcnt, unsigned flags);
+
+#endif
-- 
2.20.1



More information about the Spice-devel mailing list