Hi, I've been writing a shared-object which I'll use via LD_PRELOAD to override the open syscall. This is currently working OK but now I want to move on to fopen. I've defined it (as far as I can tell) in-line with the stdio header see here <https://play.golang.org/p/mZRwqiQ8na>. However, when I try and build:
$ go build -buildmode=c-shared # github.com/walkert/loader In file included from $WORK/github.com/walkert/loader/_obj/_cgo_export.c:3:0: ./main.go:56:14: error: conflicting types for ‘fopen’ In file included from ./main.go:5:0, from $WORK/github.com/walkert/loader/_obj/_cgo_export.c:3: /usr/include/stdio.h:275:14: note: previous declaration of ‘fopen’ was here extern FILE *fopen (const char *__restrict __filename, ^~~~~ /tmp/go-build775342366/github.com/walkert/loader/_obj/_cgo_export.c:17:7: error: conflicting types for ‘fopen’ FILE* fopen(char* p0, char* p1) ^~~~~ In file included from ./main.go:5:0, from $WORK/github.com/walkert/loader/_obj/_cgo_export.c:3: /usr/include/stdio.h:275:14: note: previous declaration of ‘fopen’ was here extern FILE *fopen (const char *__restrict __filename, ^~~~~ I've seen this before when I was trying to return an int instead of C.int so I have a feeling I'm missing something simple here. Any pointers would be much appreciated. Thanks in advance! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.