參考此篇
http://ask.wireshark.org/questions/26326/apple-maverick-and-x11
開啟terminal
rm -rf /opt/X11
download xquartz
http://xquartz.macosforge.org/landing/
安裝xquartz
需要重新開機
2013年11月14日 星期四
2013年9月3日 星期二
Sample code of dhcp client to send dhcp discover, request and inform
參考 Implement DHCP client
增加dhcp request and inform packet的發送功能
dhcp.c
build on Ubuntu 12.04.1 with gcc 4.6.3
gcc dhcp.c
./a.out
輸入1發送dhcp discover
輸入3發送dhcp request
輸入8發送dhcp inform
增加dhcp request and inform packet的發送功能
dhcp.c
build on Ubuntu 12.04.1 with gcc 4.6.3
gcc dhcp.c
./a.out
輸入1發送dhcp discover
輸入3發送dhcp request
輸入8發送dhcp inform
透過Facebook分享
2013年4月1日 星期一
Tiddlywiki使用firefox儲存文章會有以下問題-It's not possible to save changes
參考此篇文章: http://support.mozilla.org/zh-TW/questions/940021
你需要安裝這個extension: https://addons.mozilla.org/en-US/firefox/addon/tiddlyfox/
你需要安裝這個extension: https://addons.mozilla.org/en-US/firefox/addon/tiddlyfox/
透過Facebook分享
2013年3月22日 星期五
have error when build mini_httpd : previous declaration of ‘getline’ was here
mini_httpd官網
編譯mini_httpd
編譯mini_httpd
- wget http://www.acme.com/software/mini_httpd/mini_httpd-1.19.tar.gz
- tar zxvf mini_httpd-1.19.tar.gz
- cd mini_httpd-1.19/
- make
出現錯誤
htpasswd.c:52: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here
htpasswd.c: In function ‘add_password’:
htpasswd.c:117: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
htpasswd.c: In function ‘main’:
htpasswd.c:216: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
make: *** [htpasswd.o] Error 1
htpasswd.c第52行所宣告的名字getline與/usr/include/stdio.h +651命名相同
以下是/usr/include/stdio.h部分內容
/* Like `getdelim', but reads up to a newline.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern _IO_ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) __wur;
#endif
修改方式將htpasswd.c第52行函數命名方式修改 from getline to getlinexxx
另外第192行也需要修改
重新編譯
make clean
make
OK
最後訊息
gcc -O -c match.c
gcc -O -c tdate_parse.c
gcc -O -s mini_httpd.o match.o tdate_parse.o -lcrypt -o mini_httpd
gcc -O -c htpasswd.c
htpasswd.c: In function ‘add_password’:
htpasswd.c:117: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
htpasswd.c: In function ‘main’:
htpasswd.c:216: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
gcc -O -s htpasswd.o -lcrypt -o htpasswd
透過Facebook分享
2013年3月20日 星期三
訂閱:
文章 (Atom)
