{"action":"closed","number":3,"pull_request":{"url":"https://api.github.com/repos/Saruta/upkg/pulls/3","id":69440832,"html_url":"https://github.com/Saruta/upkg/pull/3","diff_url":"https://github.com/Saruta/upkg/pull/3.diff","patch_url":"https://github.com/Saruta/upkg/pull/3.patch","issue_url":"https://api.github.com/repos/Saruta/upkg/issues/3","number":3,"state":"closed","locked":false,"title":"Patch code to work on ToyOS","user":{"login":"PoisonNinja","id":12754268,"avatar_url":"https://avatars.githubusercontent.com/u/12754268?v=3","gravatar_id":"","url":"https://api.github.com/users/PoisonNinja","html_url":"https://github.com/PoisonNinja","followers_url":"https://api.github.com/users/PoisonNinja/followers","following_url":"https://api.github.com/users/PoisonNinja/following{/other_user}","gists_url":"https://api.github.com/users/PoisonNinja/gists{/gist_id}","starred_url":"https://api.github.com/users/PoisonNinja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PoisonNinja/subscriptions","organizations_url":"https://api.github.com/users/PoisonNinja/orgs","repos_url":"https://api.github.com/users/PoisonNinja/repos","events_url":"https://api.github.com/users/PoisonNinja/events{/privacy}","received_events_url":"https://api.github.com/users/PoisonNinja/received_events","type":"User","site_admin":false},"body":"Several things were changed to get upkg to build and run on ToyOS:\r\n* A missing include in upkg_db.c (fcntl.h) was added\r\n* fdopendir was changed to opendir  (fdopendir doesn't exist on ToyOS)\r\n* The if statement above fdopendir was removed, so it always constructs the path from variables. \r\n\r\nThis is a quick fix to get it to build, and no doubt there is a better way to do this.\r\n\r\nI think that the code that was changed should be wrapped in #ifdef statements, so it would be like this:\r\n\r\n```C\r\n#ifdef __TOYOS__\r\n\r\nconst char *dbdir, *rootdir;\r\nchar path[80];\r\n\r\ndbdir = upkg_config_get(\"UPKG_DBDIR\");\r\nrootdir = upkg_config_get(\"UPKG_ROOT\");\r\n\r\nsprintf(path, \"%s%s\", rootdir, dbdir);\r\n\r\n/* short ls */\r\nDIR *dirp = opendir(path);\r\n\r\n#else\r\n\r\nif (fd_pkgdir == -1) {\r\n\tconst char *dbdir, *rootdir;\r\n\tchar path[80];\r\n\r\n\tdbdir = upkg_config_get(\"UPKG_DBDIR\");\r\n\trootdir = upkg_config_get(\"UPKG_ROOT\");\r\n\r\n\tsprintf(path, \"%s%s\", rootdir, dbdir);\r\n        fd_pkgdir = open(rootdir, O_RDWR);\r\n}\r\n\r\n/* short ls */\r\nDIR *dirp = fdopendir(fd_pkgdir);\r\n\r\n#endif","created_at":"2016-05-10T02:33:57Z","updated_at":"2016-05-11T15:56:16Z","closed_at":"2016-05-11T15:56:16Z","merged_at":"2016-05-11T15:56:16Z","merge_commit_sha":"8fff642d986e42a92ca3dfa52f0e0590134fcf39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Saruta/upkg/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Saruta/upkg/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Saruta/upkg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Saruta/upkg/issues/3/comments","statuses_url":"https://api.github.com/repos/Saruta/upkg/statuses/9162f8495f9907935a43ba4dc817e29f412565c9","head":{"label":"PoisonNinja:master","ref":"master","sha":"9162f8495f9907935a43ba4dc817e29f412565c9","user":{"login":"PoisonNinja","id":12754268,"avatar_url":"https://avatars.githubusercontent.com/u/12754268?v=3","gravatar_id":"","url":"https://api.github.com/users/PoisonNinja","html_url":"https://github.com/PoisonNinja","followers_url":"https://api.github.com/users/PoisonNinja/followers","following_url":"https://api.github.com/users/PoisonNinja/following{/other_user}","gists_url":"https://api.github.com/users/PoisonNinja/gists{/gist_id}","starred_url":"https://api.github.com/users/PoisonNinja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PoisonNinja/subscriptions","organizations_url":"https://api.github.com/users/PoisonNinja/orgs","repos_url":"https://api.github.com/users/PoisonNinja/repos","events_url":"https://api.github.com/users/PoisonNinja/events{/privacy}","received_events_url":"https://api.github.com/users/PoisonNinja/received_events","type":"User","site_admin":false},"repo":{"id":56611099,"name":"upkg","full_name":"PoisonNinja/upkg","owner":{"login":"PoisonNinja","id":12754268,"avatar_url":"https://avatars.githubusercontent.com/u/12754268?v=3","gravatar_id":"","url":"https://api.github.com/users/PoisonNinja","html_url":"https://github.com/PoisonNinja","followers_url":"https://api.github.com/users/PoisonNinja/followers","following_url":"https://api.github.com/users/PoisonNinja/following{/other_user}","gists_url":"https://api.github.com/users/PoisonNinja/gists{/gist_id}","starred_url":"https://api.github.com/users/PoisonNinja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PoisonNinja/subscriptions","organizations_url":"https://api.github.com/users/PoisonNinja/orgs","repos_url":"https://api.github.com/users/PoisonNinja/repos","events_url":"https://api.github.com/users/PoisonNinja/events{/privacy}","received_events_url":"https://api.github.com/users/PoisonNinja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PoisonNinja/upkg","description":"Tiny binary package manager ","fork":true,"url":"https://api.github.com/repos/PoisonNinja/upkg","forks_url":"https://api.github.com/repos/PoisonNinja/upkg/forks","keys_url":"https://api.github.com/repos/PoisonNinja/upkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PoisonNinja/upkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PoisonNinja/upkg/teams","hooks_url":"https://api.github.com/repos/PoisonNinja/upkg/hooks","issue_events_url":"https://api.github.com/repos/PoisonNinja/upkg/issues/events{/number}","events_url":"https://api.github.com/repos/PoisonNinja/upkg/events","assignees_url":"https://api.github.com/repos/PoisonNinja/upkg/assignees{/user}","branches_url":"https://api.github.com/repos/PoisonNinja/upkg/branches{/branch}","tags_url":"https://api.github.com/repos/PoisonNinja/upkg/tags","blobs_url":"https://api.github.com/repos/PoisonNinja/upkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PoisonNinja/upkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PoisonNinja/upkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/PoisonNinja/upkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PoisonNinja/upkg/statuses/{sha}","languages_url":"https://api.github.com/repos/PoisonNinja/upkg/languages","stargazers_url":"https://api.github.com/repos/PoisonNinja/upkg/stargazers","contributors_url":"https://api.github.com/repos/PoisonNinja/upkg/contributors","subscribers_url":"https://api.github.com/repos/PoisonNinja/upkg/subscribers","subscription_url":"https://api.github.com/repos/PoisonNinja/upkg/subscription","commits_url":"https://api.github.com/repos/PoisonNinja/upkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/PoisonNinja/upkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/PoisonNinja/upkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/PoisonNinja/upkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/PoisonNinja/upkg/contents/{+path}","compare_url":"https://api.github.com/repos/PoisonNinja/upkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PoisonNinja/upkg/merges","archive_url":"https://api.github.com/repos/PoisonNinja/upkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PoisonNinja/upkg/downloads","issues_url":"https://api.github.com/repos/PoisonNinja/upkg/issues{/number}","pulls_url":"https://api.github.com/repos/PoisonNinja/upkg/pulls{/number}","milestones_url":"https://api.github.com/repos/PoisonNinja/upkg/milestones{/number}","notifications_url":"https://api.github.com/repos/PoisonNinja/upkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PoisonNinja/upkg/labels{/name}","releases_url":"https://api.github.com/repos/PoisonNinja/upkg/releases{/id}","deployments_url":"https://api.github.com/repos/PoisonNinja/upkg/deployments","created_at":"2016-04-19T15:56:07Z","updated_at":"2016-05-02T14:29:10Z","pushed_at":"2016-05-10T02:18:15Z","git_url":"git://github.com/PoisonNinja/upkg.git","ssh_url":"git@github.com:PoisonNinja/upkg.git","clone_url":"https://github.com/PoisonNinja/upkg.git","svn_url":"https://github.com/PoisonNinja/upkg","homepage":null,"size":145,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Saruta:master","ref":"master","sha":"05c555742060cf329fb4a157c9c24f7cb82d199f","user":{"login":"Saruta","id":8758336,"avatar_url":"https://avatars.githubusercontent.com/u/8758336?v=3","gravatar_id":"","url":"https://api.github.com/users/Saruta","html_url":"https://github.com/Saruta","followers_url":"https://api.github.com/users/Saruta/followers","following_url":"https://api.github.com/users/Saruta/following{/other_user}","gists_url":"https://api.github.com/users/Saruta/gists{/gist_id}","starred_url":"https://api.github.com/users/Saruta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saruta/subscriptions","organizations_url":"https://api.github.com/users/Saruta/orgs","repos_url":"https://api.github.com/users/Saruta/repos","events_url":"https://api.github.com/users/Saruta/events{/privacy}","received_events_url":"https://api.github.com/users/Saruta/received_events","type":"User","site_admin":false},"repo":{"id":55872709,"name":"upkg","full_name":"Saruta/upkg","owner":{"login":"Saruta","id":8758336,"avatar_url":"https://avatars.githubusercontent.com/u/8758336?v=3","gravatar_id":"","url":"https://api.github.com/users/Saruta","html_url":"https://github.com/Saruta","followers_url":"https://api.github.com/users/Saruta/followers","following_url":"https://api.github.com/users/Saruta/following{/other_user}","gists_url":"https://api.github.com/users/Saruta/gists{/gist_id}","starred_url":"https://api.github.com/users/Saruta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saruta/subscriptions","organizations_url":"https://api.github.com/users/Saruta/orgs","repos_url":"https://api.github.com/users/Saruta/repos","events_url":"https://api.github.com/users/Saruta/events{/privacy}","received_events_url":"https://api.github.com/users/Saruta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Saruta/upkg","description":"Tiny binary package manager ","fork":false,"url":"https://api.github.com/repos/Saruta/upkg","forks_url":"https://api.github.com/repos/Saruta/upkg/forks","keys_url":"https://api.github.com/repos/Saruta/upkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Saruta/upkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Saruta/upkg/teams","hooks_url":"https://api.github.com/repos/Saruta/upkg/hooks","issue_events_url":"https://api.github.com/repos/Saruta/upkg/issues/events{/number}","events_url":"https://api.github.com/repos/Saruta/upkg/events","assignees_url":"https://api.github.com/repos/Saruta/upkg/assignees{/user}","branches_url":"https://api.github.com/repos/Saruta/upkg/branches{/branch}","tags_url":"https://api.github.com/repos/Saruta/upkg/tags","blobs_url":"https://api.github.com/repos/Saruta/upkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Saruta/upkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Saruta/upkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Saruta/upkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Saruta/upkg/statuses/{sha}","languages_url":"https://api.github.com/repos/Saruta/upkg/languages","stargazers_url":"https://api.github.com/repos/Saruta/upkg/stargazers","contributors_url":"https://api.github.com/repos/Saruta/upkg/contributors","subscribers_url":"https://api.github.com/repos/Saruta/upkg/subscribers","subscription_url":"https://api.github.com/repos/Saruta/upkg/subscription","commits_url":"https://api.github.com/repos/Saruta/upkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Saruta/upkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Saruta/upkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Saruta/upkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Saruta/upkg/contents/{+path}","compare_url":"https://api.github.com/repos/Saruta/upkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Saruta/upkg/merges","archive_url":"https://api.github.com/repos/Saruta/upkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Saruta/upkg/downloads","issues_url":"https://api.github.com/repos/Saruta/upkg/issues{/number}","pulls_url":"https://api.github.com/repos/Saruta/upkg/pulls{/number}","milestones_url":"https://api.github.com/repos/Saruta/upkg/milestones{/number}","notifications_url":"https://api.github.com/repos/Saruta/upkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Saruta/upkg/labels{/name}","releases_url":"https://api.github.com/repos/Saruta/upkg/releases{/id}","deployments_url":"https://api.github.com/repos/Saruta/upkg/deployments","created_at":"2016-04-10T00:00:43Z","updated_at":"2016-05-01T21:49:01Z","pushed_at":"2016-05-11T15:56:16Z","git_url":"git://github.com/Saruta/upkg.git","ssh_url":"git@github.com:Saruta/upkg.git","clone_url":"https://github.com/Saruta/upkg.git","svn_url":"https://github.com/Saruta/upkg","homepage":null,"size":191,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Saruta/upkg/pulls/3"},"html":{"href":"https://github.com/Saruta/upkg/pull/3"},"issue":{"href":"https://api.github.com/repos/Saruta/upkg/issues/3"},"comments":{"href":"https://api.github.com/repos/Saruta/upkg/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Saruta/upkg/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Saruta/upkg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Saruta/upkg/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Saruta/upkg/statuses/9162f8495f9907935a43ba4dc817e29f412565c9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Saruta","id":8758336,"avatar_url":"https://avatars.githubusercontent.com/u/8758336?v=3","gravatar_id":"","url":"https://api.github.com/users/Saruta","html_url":"https://github.com/Saruta","followers_url":"https://api.github.com/users/Saruta/followers","following_url":"https://api.github.com/users/Saruta/following{/other_user}","gists_url":"https://api.github.com/users/Saruta/gists{/gist_id}","starred_url":"https://api.github.com/users/Saruta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saruta/subscriptions","organizations_url":"https://api.github.com/users/Saruta/orgs","repos_url":"https://api.github.com/users/Saruta/repos","events_url":"https://api.github.com/users/Saruta/events{/privacy}","received_events_url":"https://api.github.com/users/Saruta/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":3,"additions":10,"deletions":9,"changed_files":1}}