Skip to content

[showcase] a build once run anywhere binary #3

@mochaaP

Description

@mochaaP

demo

prebuilt binary: main.com.gz
supported: Linux, NetBSD, FreeBSD, OpenBSD, Mac OS X, Windows

2,19d1
< #include <sys/types.h>
< #include <stdio.h>
< #include <stdarg.h>
< #include <time.h>
< #include <errno.h>
< #include <unistd.h>
< #include <signal.h>
< #include <stdlib.h>
< #include <stdint.h>
< #include <string.h>
< #include <sys/socket.h>
< #include <sys/fcntl.h>
< #include <sys/stat.h>
< #include <netdb.h>
< #include <sys/select.h>
< #include <arpa/inet.h>
< #include <netinet/tcp.h>
< #include <pthread.h>
110c92,93
< 				buf += nread;
---
> 				char* buf_c = (char*)buf;
> 				buf_c += nread;
130c113,114
< 				buf += nwrite;
---
> 				char* buf_c = (char*)buf;
> 				buf_c += nwrite;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions