{"action":"created","issue":{"url":"https://api.github.com/repos/dgraziotin/mbpfan/issues/88","repository_url":"https://api.github.com/repos/dgraziotin/mbpfan","labels_url":"https://api.github.com/repos/dgraziotin/mbpfan/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/dgraziotin/mbpfan/issues/88/comments","events_url":"https://api.github.com/repos/dgraziotin/mbpfan/issues/88/events","html_url":"https://github.com/dgraziotin/mbpfan/issues/88","id":180469214,"number":88,"title":"build failure with gcc-4.9.4","user":{"login":"egorenar","id":22225998,"avatar_url":"https://avatars.githubusercontent.com/u/22225998?v=3","gravatar_id":"","url":"https://api.github.com/users/egorenar","html_url":"https://github.com/egorenar","followers_url":"https://api.github.com/users/egorenar/followers","following_url":"https://api.github.com/users/egorenar/following{/other_user}","gists_url":"https://api.github.com/users/egorenar/gists{/gist_id}","starred_url":"https://api.github.com/users/egorenar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egorenar/subscriptions","organizations_url":"https://api.github.com/users/egorenar/orgs","repos_url":"https://api.github.com/users/egorenar/repos","events_url":"https://api.github.com/users/egorenar/events{/privacy}","received_events_url":"https://api.github.com/users/egorenar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-01T17:33:21Z","updated_at":"2016-10-02T06:08:48Z","closed_at":"2016-10-02T06:08:48Z","body":"Hi,\r\n\r\nmbpfan cannot be built with gcc 4.9.4, at least on my MacBook with Void Linux.\r\nWith the below patch it compiles sucessfully.\r\nRegards.\r\n\r\nErrors:\r\n\r\n```\r\nmake CCMD=gcc\r\nmkdir -p bin\r\nCompiling src/daemon...\r\ngcc -c  -g    src/daemon.c -osrc/daemon.o\r\nIn file included from src/daemon.c:30:0:\r\nsrc/mbpfan.h:49:1: error: unknown type name 'bool'\r\n bool is_legacy_kernel();\r\n ^\r\nsrc/daemon.c: In function 'cleanup_and_exit':\r\nsrc/daemon.c:80:2: error: unknown type name 's_fans'\r\n  s_fans *next_fan;\r\n  ^\r\nsrc/daemon.c:82:12: warning: assignment from incompatible pointer type\r\n   next_fan = fans->next;\r\n            ^\r\nsrc/daemon.c:86:8: warning: assignment from incompatible pointer type\r\n   fans = next_fan;\r\n        ^\r\nsrc/daemon.c:89:2: error: unknown type name 's_sensors'\r\n  s_sensors *next_sensor;\r\n  ^\r\nsrc/daemon.c:91:15: warning: assignment from incompatible pointer type\r\n   next_sensor = sensors->next;\r\n               ^\r\nsrc/daemon.c:94:11: warning: assignment from incompatible pointer type\r\n   sensors = next_sensor;\r\n           ^\r\nmake: *** [Makefile:50: src/daemon.o] Error 1\r\n```\r\n\r\n\r\nAnd this is my patch to fix the problem:\r\n```\r\n\r\nFrom 4b61288e9390b6c6556726dba06c84d37cd939c8 Mon Sep 17 00:00:00 2001\r\nFrom: Alexander Egorenkov <egorenar@posteo.net>\r\nDate: Sat, 1 Oct 2016 19:25:54 +0200\r\nSubject: [PATCH] fix build\r\n\r\n---\r\n src/daemon.c | 4 ++--\r\n src/mbpfan.h | 4 +++-\r\n 2 files changed, 5 insertions(+), 3 deletions(-)\r\n\r\ndiff --git a/src/daemon.c b/src/daemon.c\r\nindex 93b0e26..e4a4301 100755\r\n--- a/src/daemon.c\r\n+++ b/src/daemon.c\r\n@@ -77,7 +77,7 @@ static void cleanup_and_exit(int exit_code)\r\n        delete_pid();\r\n        set_fans_auto(fans);\r\n\r\n-       s_fans *next_fan;\r\n+    t_fans *next_fan;\r\n        while (fans != NULL) {\r\n                next_fan = fans->next;\r\n                free(fans->fan_output_path);\r\n@@ -86,7 +86,7 @@ static void cleanup_and_exit(int exit_code)\r\n                fans = next_fan;\r\n        }\r\n\r\n-       s_sensors *next_sensor;\r\n+    t_sensors *next_sensor;\r\n        while (sensors != NULL) {\r\n                next_sensor = sensors->next;\r\n                free(sensors->path);\r\ndiff --git a/src/mbpfan.h b/src/mbpfan.h\r\nindex d6250fa..9e43525 100644\r\n--- a/src/mbpfan.h\r\n+++ b/src/mbpfan.h\r\n@@ -17,6 +17,8 @@\r\n #ifndef _MBPFAN_H_\r\n #define _MBPFAN_H_\r\n\r\n+#include <stdbool.h>\r\n+\r\n /** Basic fan speed parameters\r\n  */\r\n extern int min_fan_speed;\r\n@@ -101,4 +103,4 @@ unsigned short get_temp(t_sensors* sensors);\r\n  */\r\n void mbpfan();\r\n\r\n-#endif\r\n\\ No newline at end of file\r\n+#endif\r\n--\r\n2.10.0\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/dgraziotin/mbpfan/issues/comments/250955826","html_url":"https://github.com/dgraziotin/mbpfan/issues/88#issuecomment-250955826","issue_url":"https://api.github.com/repos/dgraziotin/mbpfan/issues/88","id":250955826,"user":{"login":"egorenar","id":22225998,"avatar_url":"https://avatars.githubusercontent.com/u/22225998?v=3","gravatar_id":"","url":"https://api.github.com/users/egorenar","html_url":"https://github.com/egorenar","followers_url":"https://api.github.com/users/egorenar/followers","following_url":"https://api.github.com/users/egorenar/following{/other_user}","gists_url":"https://api.github.com/users/egorenar/gists{/gist_id}","starred_url":"https://api.github.com/users/egorenar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egorenar/subscriptions","organizations_url":"https://api.github.com/users/egorenar/orgs","repos_url":"https://api.github.com/users/egorenar/repos","events_url":"https://api.github.com/users/egorenar/events{/privacy}","received_events_url":"https://api.github.com/users/egorenar/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T06:08:48Z","updated_at":"2016-10-02T06:08:48Z","body":"Sorry, it was a problem on my side.\r\nCompiling it with g++ instead of gcc solved the issue.\r\nThanks."}}
{"actor":{"display_login":"egorenar"}}