{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/osquery/pulls/comments/33813318","id":33813318,"diff_hunk":"@@ -0,0 +1,69 @@\n+/*\n+ *  Copyright (c) 2014, Facebook, Inc.\n+ *  All rights reserved.\n+ *\n+ *  This source code is licensed under the BSD-style license found in the\n+ *  LICENSE file in the root directory of this source tree. An additional grant\n+ *  of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ */\n+\n+#include <osquery/tables.h>\n+\n+#if defined(__APPLE__)\n+  #include <time.h>\n+  #include <errno.h>\n+  #include <sys/sysctl.h>\n+#elif defined(__linux) || defined(__linux__) || defined(linux)","path":"osquery/tables/system/uptime.cpp","position":17,"original_position":17,"commit_id":"020c0d99fd8d4a48363aba6ce58f7034f73c9ac5","original_commit_id":"020c0d99fd8d4a48363aba6ce58f7034f73c9ac5","user":{"login":"theopolis","id":981645,"avatar_url":"https://avatars.githubusercontent.com/u/981645?v=3","gravatar_id":"","url":"https://api.github.com/users/theopolis","html_url":"https://github.com/theopolis","followers_url":"https://api.github.com/users/theopolis/followers","following_url":"https://api.github.com/users/theopolis/following{/other_user}","gists_url":"https://api.github.com/users/theopolis/gists{/gist_id}","starred_url":"https://api.github.com/users/theopolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theopolis/subscriptions","organizations_url":"https://api.github.com/users/theopolis/orgs","repos_url":"https://api.github.com/users/theopolis/repos","events_url":"https://api.github.com/users/theopolis/events{/privacy}","received_events_url":"https://api.github.com/users/theopolis/received_events","type":"User","site_admin":false},"body":"We do have an undocumented set of defines that allow us to specify the platform from CMake logic. One day we should codemod out all the compiled-based decision logic (e.g.: `gcc -dM -E - < /dev/null`) and prefer our CMake decisions as the source of truth.","created_at":"2015-07-02T19:23:24Z","updated_at":"2015-07-02T19:23:24Z","html_url":"https://github.com/facebook/osquery/pull/1290#discussion_r33813318","pull_request_url":"https://api.github.com/repos/facebook/osquery/pulls/1290","_links":{"self":{"href":"https://api.github.com/repos/facebook/osquery/pulls/comments/33813318"},"html":{"href":"https://github.com/facebook/osquery/pull/1290#discussion_r33813318"},"pull_request":{"href":"https://api.github.com/repos/facebook/osquery/pulls/1290"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/osquery/pulls/1290","id":39051174,"html_url":"https://github.com/facebook/osquery/pull/1290","diff_url":"https://github.com/facebook/osquery/pull/1290.diff","patch_url":"https://github.com/facebook/osquery/pull/1290.patch","issue_url":"https://api.github.com/repos/facebook/osquery/issues/1290","number":1290,"state":"open","locked":false,"title":"Uptime","user":{"login":"timzimmermann","id":5834455,"avatar_url":"https://avatars.githubusercontent.com/u/5834455?v=3","gravatar_id":"","url":"https://api.github.com/users/timzimmermann","html_url":"https://github.com/timzimmermann","followers_url":"https://api.github.com/users/timzimmermann/followers","following_url":"https://api.github.com/users/timzimmermann/following{/other_user}","gists_url":"https://api.github.com/users/timzimmermann/gists{/gist_id}","starred_url":"https://api.github.com/users/timzimmermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timzimmermann/subscriptions","organizations_url":"https://api.github.com/users/timzimmermann/orgs","repos_url":"https://api.github.com/users/timzimmermann/repos","events_url":"https://api.github.com/users/timzimmermann/events{/privacy}","received_events_url":"https://api.github.com/users/timzimmermann/received_events","type":"User","site_admin":false},"body":"Add a table that shows the time passed since the last boot.\r\n\r\nSee #1273.","created_at":"2015-07-02T06:14:52Z","updated_at":"2015-07-02T19:23:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64ba026adf55763ccb5b1a28bbedacf4ec32da99","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/osquery/pulls/1290/commits","review_comments_url":"https://api.github.com/repos/facebook/osquery/pulls/1290/comments","review_comment_url":"https://api.github.com/repos/facebook/osquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/osquery/issues/1290/comments","statuses_url":"https://api.github.com/repos/facebook/osquery/statuses/020c0d99fd8d4a48363aba6ce58f7034f73c9ac5","head":{"label":"timzimmermann:uptime","ref":"uptime","sha":"020c0d99fd8d4a48363aba6ce58f7034f73c9ac5","user":{"login":"timzimmermann","id":5834455,"avatar_url":"https://avatars.githubusercontent.com/u/5834455?v=3","gravatar_id":"","url":"https://api.github.com/users/timzimmermann","html_url":"https://github.com/timzimmermann","followers_url":"https://api.github.com/users/timzimmermann/followers","following_url":"https://api.github.com/users/timzimmermann/following{/other_user}","gists_url":"https://api.github.com/users/timzimmermann/gists{/gist_id}","starred_url":"https://api.github.com/users/timzimmermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timzimmermann/subscriptions","organizations_url":"https://api.github.com/users/timzimmermann/orgs","repos_url":"https://api.github.com/users/timzimmermann/repos","events_url":"https://api.github.com/users/timzimmermann/events{/privacy}","received_events_url":"https://api.github.com/users/timzimmermann/received_events","type":"User","site_admin":false},"repo":{"id":38060748,"name":"osquery","full_name":"timzimmermann/osquery","owner":{"login":"timzimmermann","id":5834455,"avatar_url":"https://avatars.githubusercontent.com/u/5834455?v=3","gravatar_id":"","url":"https://api.github.com/users/timzimmermann","html_url":"https://github.com/timzimmermann","followers_url":"https://api.github.com/users/timzimmermann/followers","following_url":"https://api.github.com/users/timzimmermann/following{/other_user}","gists_url":"https://api.github.com/users/timzimmermann/gists{/gist_id}","starred_url":"https://api.github.com/users/timzimmermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timzimmermann/subscriptions","organizations_url":"https://api.github.com/users/timzimmermann/orgs","repos_url":"https://api.github.com/users/timzimmermann/repos","events_url":"https://api.github.com/users/timzimmermann/events{/privacy}","received_events_url":"https://api.github.com/users/timzimmermann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timzimmermann/osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","fork":true,"url":"https://api.github.com/repos/timzimmermann/osquery","forks_url":"https://api.github.com/repos/timzimmermann/osquery/forks","keys_url":"https://api.github.com/repos/timzimmermann/osquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timzimmermann/osquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timzimmermann/osquery/teams","hooks_url":"https://api.github.com/repos/timzimmermann/osquery/hooks","issue_events_url":"https://api.github.com/repos/timzimmermann/osquery/issues/events{/number}","events_url":"https://api.github.com/repos/timzimmermann/osquery/events","assignees_url":"https://api.github.com/repos/timzimmermann/osquery/assignees{/user}","branches_url":"https://api.github.com/repos/timzimmermann/osquery/branches{/branch}","tags_url":"https://api.github.com/repos/timzimmermann/osquery/tags","blobs_url":"https://api.github.com/repos/timzimmermann/osquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timzimmermann/osquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timzimmermann/osquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/timzimmermann/osquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timzimmermann/osquery/statuses/{sha}","languages_url":"https://api.github.com/repos/timzimmermann/osquery/languages","stargazers_url":"https://api.github.com/repos/timzimmermann/osquery/stargazers","contributors_url":"https://api.github.com/repos/timzimmermann/osquery/contributors","subscribers_url":"https://api.github.com/repos/timzimmermann/osquery/subscribers","subscription_url":"https://api.github.com/repos/timzimmermann/osquery/subscription","commits_url":"https://api.github.com/repos/timzimmermann/osquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/timzimmermann/osquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/timzimmermann/osquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/timzimmermann/osquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/timzimmermann/osquery/contents/{+path}","compare_url":"https://api.github.com/repos/timzimmermann/osquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timzimmermann/osquery/merges","archive_url":"https://api.github.com/repos/timzimmermann/osquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timzimmermann/osquery/downloads","issues_url":"https://api.github.com/repos/timzimmermann/osquery/issues{/number}","pulls_url":"https://api.github.com/repos/timzimmermann/osquery/pulls{/number}","milestones_url":"https://api.github.com/repos/timzimmermann/osquery/milestones{/number}","notifications_url":"https://api.github.com/repos/timzimmermann/osquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timzimmermann/osquery/labels{/name}","releases_url":"https://api.github.com/repos/timzimmermann/osquery/releases{/id}","created_at":"2015-06-25T16:28:31Z","updated_at":"2015-06-25T16:28:32Z","pushed_at":"2015-07-02T06:56:00Z","git_url":"git://github.com/timzimmermann/osquery.git","ssh_url":"git@github.com:timzimmermann/osquery.git","clone_url":"https://github.com/timzimmermann/osquery.git","svn_url":"https://github.com/timzimmermann/osquery","homepage":"https://osquery.io","size":5477,"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":"facebook:master","ref":"master","sha":"51f594e2bf9526323c127c1a526ab58f666b1683","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":22394357,"name":"osquery","full_name":"facebook/osquery","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/osquery","description":"SQL powered operating system instrumentation, monitoring, and analytics.","fork":false,"url":"https://api.github.com/repos/facebook/osquery","forks_url":"https://api.github.com/repos/facebook/osquery/forks","keys_url":"https://api.github.com/repos/facebook/osquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/osquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/osquery/teams","hooks_url":"https://api.github.com/repos/facebook/osquery/hooks","issue_events_url":"https://api.github.com/repos/facebook/osquery/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/osquery/events","assignees_url":"https://api.github.com/repos/facebook/osquery/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/osquery/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/osquery/tags","blobs_url":"https://api.github.com/repos/facebook/osquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/osquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/osquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/osquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/osquery/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/osquery/languages","stargazers_url":"https://api.github.com/repos/facebook/osquery/stargazers","contributors_url":"https://api.github.com/repos/facebook/osquery/contributors","subscribers_url":"https://api.github.com/repos/facebook/osquery/subscribers","subscription_url":"https://api.github.com/repos/facebook/osquery/subscription","commits_url":"https://api.github.com/repos/facebook/osquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/osquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/osquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/osquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/osquery/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/osquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/osquery/merges","archive_url":"https://api.github.com/repos/facebook/osquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/osquery/downloads","issues_url":"https://api.github.com/repos/facebook/osquery/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/osquery/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/osquery/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/osquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/osquery/labels{/name}","releases_url":"https://api.github.com/repos/facebook/osquery/releases{/id}","created_at":"2014-07-29T20:27:33Z","updated_at":"2015-07-02T12:55:41Z","pushed_at":"2015-07-02T19:16:06Z","git_url":"git://github.com/facebook/osquery.git","ssh_url":"git@github.com:facebook/osquery.git","clone_url":"https://github.com/facebook/osquery.git","svn_url":"https://github.com/facebook/osquery","homepage":"https://osquery.io","size":14352,"stargazers_count":4505,"watchers_count":4505,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":373,"mirror_url":null,"open_issues_count":36,"forks":373,"open_issues":36,"watchers":4505,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/osquery/pulls/1290"},"html":{"href":"https://github.com/facebook/osquery/pull/1290"},"issue":{"href":"https://api.github.com/repos/facebook/osquery/issues/1290"},"comments":{"href":"https://api.github.com/repos/facebook/osquery/issues/1290/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/osquery/pulls/1290/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/osquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/osquery/pulls/1290/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/osquery/statuses/020c0d99fd8d4a48363aba6ce58f7034f73c9ac5"}}}}