From 452ddd94ba22bebe0fda5ee6a7ddceae2057fe40 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 02:01:04 +0000 Subject: r3450: portability fixes - fix rep_inet_ntoa() for IRIX - lib/signal.c needs system/wait.h - some systems define a macro "accept", which breaks the lib/socket/ structures. use fn_ as a prefix for the structure elements to avoid the problem (This used to be commit ced1a0fcdc8d8e47755ce4391c19f8b12862eb60) --- source4/lib/socket/socket.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'source4/lib/socket/socket.h') diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h index 6e54a37b80..7a8d335962 100644 --- a/source4/lib/socket/socket.h +++ b/source4/lib/socket/socket.h @@ -31,36 +31,36 @@ struct socket_ops { const char *name; enum socket_type type; - NTSTATUS (*init)(struct socket_context *sock); + NTSTATUS (*fn_init)(struct socket_context *sock); /* client ops */ - NTSTATUS (*connect)(struct socket_context *sock, + NTSTATUS (*fn_connect)(struct socket_context *sock, const char *my_address, int my_port, const char *server_address, int server_port, uint32_t flags); /* server ops */ - NTSTATUS (*listen)(struct socket_context *sock, + NTSTATUS (*fn_listen)(struct socket_context *sock, const char *my_address, int port, int queue_size, uint32_t flags); - NTSTATUS (*accept)(struct socket_context *sock, struct socket_context **new_sock); + NTSTATUS (*fn_accept)(struct socket_context *sock, struct socket_context **new_sock); /* general ops */ - NTSTATUS (*recv)(struct socket_context *sock, void *buf, + NTSTATUS (*fn_recv)(struct socket_context *sock, void *buf, size_t wantlen, size_t *nread, uint32_t flags); - NTSTATUS (*send)(struct socket_context *sock, + NTSTATUS (*fn_send)(struct socket_context *sock, const DATA_BLOB *blob, size_t *sendlen, uint32_t flags); - void (*close)(struct socket_context *sock); + void (*fn_close)(struct socket_context *sock); - NTSTATUS (*set_option)(struct socket_context *sock, const char *option, const char *val); + NTSTATUS (*fn_set_option)(struct socket_context *sock, const char *option, const char *val); - char *(*get_peer_name)(struct socket_context *sock, TALLOC_CTX *mem_ctx); - char *(*get_peer_addr)(struct socket_context *sock, TALLOC_CTX *mem_ctx); - int (*get_peer_port)(struct socket_context *sock); - char *(*get_my_addr)(struct socket_context *sock, TALLOC_CTX *mem_ctx); - int (*get_my_port)(struct socket_context *sock); + char *(*fn_get_peer_name)(struct socket_context *sock, TALLOC_CTX *mem_ctx); + char *(*fn_get_peer_addr)(struct socket_context *sock, TALLOC_CTX *mem_ctx); + int (*fn_get_peer_port)(struct socket_context *sock); + char *(*fn_get_my_addr)(struct socket_context *sock, TALLOC_CTX *mem_ctx); + int (*fn_get_my_port)(struct socket_context *sock); - int (*get_fd)(struct socket_context *sock); + int (*fn_get_fd)(struct socket_context *sock); }; enum socket_state { -- cgit