mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Get codebase completely working with LLVM
You can now build Cosmopolitan with Clang: make -j8 MODE=llvm o/llvm/examples/hello.com The assembler and linker code is now friendly to LLVM too. So it's not needed to configure Clang to use binutils under the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
parent
0e36cb3ac4
commit
e75ffde09e
4528 changed files with 7776 additions and 11640 deletions
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/sock/internal.h"
|
||||
|
@ -41,8 +42,7 @@ int bind(int fd, const void *addr, uint32_t addrsize) {
|
|||
return sys_bind(fd, addr, addrsize);
|
||||
} else {
|
||||
struct sockaddr_in_bsd addr2;
|
||||
_Static_assert(sizeof(struct sockaddr_in) ==
|
||||
sizeof(struct sockaddr_in_bsd));
|
||||
assert(sizeof(struct sockaddr_in) == sizeof(struct sockaddr_in_bsd));
|
||||
memcpy(&addr2, addr, sizeof(struct sockaddr_in));
|
||||
sockaddr2bsd(&addr2);
|
||||
return sys_bind(fd, &addr2, addrsize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue