taka-tuos / nanotodon

CLI mastodon client
MIT License
35 stars 6 forks source link

いろいろが壊れている(ビルド不能) #29

Closed taka-tuos closed 1 month ago

taka-tuos commented 1 month ago

on ArchLinux

wget_wchや、str系関数、timegm/strptime等が定義されていないと怒られる define不足が原因?

nanotodon.c:289:9: エラー: implicit declaration of function ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
  289 |         strptime(created_at->string_, "%Y-%m-%dT%H:%M:%S", &tm);
      |         ^~~~~~~~
      |         strftime
nanotodon.c:1191:17: エラー: implicit declaration of function ‘wget_wch’; did you mean ‘wgetch’? [-Wimplicit-function-declaration]
 1191 |                 wget_wch(pad, &c);
      |                 ^~~~~~~~
      |
sjson.h: 関数 ‘sjson_find_member_nocase’ 内:
sjson.h:394:50: エラー: 関数 ‘strcasecmp’ の暗黙的な宣言です [-Wimplicit-function-declaration]
  394 | #               define sjson_stricmp(_a, _b)     strcasecmp(_a, _b)
      |                                                  ^~~~~~~~~~
sjson.h:1198:13: 備考: in expansion of macro ‘sjson_stricmp’
 1198 |         if (sjson_stricmp(member->key, name) == 0)
      |             ^~~~~~~~~~~~~
nanotodon.c: 関数 ‘read_json_fom_path’ 内:
nanotodon.c:147:21: エラー: 関数 ‘strdup’ の暗黙的な宣言です [-Wimplicit-function-declaration]
  147 |         char *dup = strdup(path);       // strtokは破壊するので複製
      |                     ^~~~~~
nanotodon.c:147:21: 警告: 組み込み関数 ‘strdup’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
nanotodon.c: 関数 ‘stream_event_notify’ 内:
nanotodon.c:234:19: 警告: 組み込み関数 ‘strdup’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
  234 |         char *t = strdup(notify_type->string_);
      |                   ^~~~~~
nanotodon.c: 関数 ‘stream_event_update’ 内:
nanotodon.c:290:16: エラー: implicit declaration of function ‘timegm’; did you mean ‘time’? [-Wimplicit-function-declaration]
  290 |         time = timegm(&tm);
      |                ^~~~~~
      |
taka-tuos commented 1 month ago

少なくともどちらか片方:

taka-tuos commented 1 month ago

0.4.0マイルストーンへ統合のためclose