Created
November 13, 2016 10:04
-
-
Save maiha/9b86bbea607be2431befe3ee63b2d539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% git clone git@github.com:crystal-lang/crystal_lib.git | |
% cd crystal_lib | |
% cat > lib_ntohl.cr | |
@[Include("arpa/inet.h")] | |
lib LibC | |
fun ntohl | |
end | |
% crystal src/main.cr -- lib_ntohl.cr | |
lib LibC | |
alias Uint32T = LibC::UInt | |
fun ntohl(__netlong : Uint32T) : Uint32T | |
end | |
# got it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment