GitHub PullRequestReviewCommentEvent at 2014-09-12 05:28:26
Repository: cfacter
Actor: vrthra
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/17463564","id":17463564,"diff_hunk":"@@ -0,0 +1,62 @@\n+/**\n+ * @file\n+ * Declares the k_stat resource.\n+ */\n+#ifndef FACTER_UTIL_SOLARIS_K_STAT_HPP_\n+#define FACTER_UTIL_SOLARIS_K_STAT_HPP_\n+\n+#include \"scoped_kstat.hpp\"\n+#include <vector>\n+\n+namespace facter { namespace util { namespace solaris {\n+\n+    /**\n+     * Wrapper around the kstat_t structure.\n+     */\n+    struct k_stat_entry {\n+        /**\n+         * Default constructor. Should be created only by k_stat[] call.\n+         */\n+        k_stat_entry(kstat_t* kp);\n+\n+        /*\n+         * Get unsigned long value out of our kstat_named_t\n+         * pointer. We might need other data types too when\n+         * other resolvers using kstat are added.\n+         */\n+        template <typename T>\n+        T value(const std::string& attrib);","path":"lib/inc/facter/util/solaris/k_stat.hpp","position":28,"original_position":28,"commit_id":"bdb084f746679980c2ae4818cc337dd0ae023453","original_commit_id":"bdb084f746679980c2ae4818cc337dd0ae023453","user":{"login":"vrthra","id":70410,"avatar_url":"https://avatars.githubusercontent.com/u/70410?v=2","gravatar_id":"e691538fed1de0cc9b2f7cf1a0c11cb1","url":"https://api.github.com/users/vrthra","html_url":"https://github.com/vrthra","followers_url":"https://api.github.com/users/vrthra/followers","following_url":"https://api.github.com/users/vrthra/following{/other_user}","gists_url":"https://api.github.com/users/vrthra/gists{/gist_id}","starred_url":"https://api.github.com/users/vrthra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrthra/subscriptions","organizations_url":"https://api.github.com/users/vrthra/orgs","repos_url":"https://api.github.com/users/vrthra/repos","events_url":"https://api.github.com/users/vrthra/events{/privacy}","received_events_url":"https://api.github.com/users/vrthra/received_events","type":"User","site_admin":false},"body":"Getting this error when I move the definition to the hpp file. The error comes from both files that include the hpp\r\n\r\nld: fatal: symbol 'unsigned long facter::util::solaris::k_stat_entry::value<unsigned long>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' is multiply-defined:\r\n        (file CMakeFiles/libfacter.dir/src/util/solaris/k_stat.cc.o type=FUNC; file CMakeFiles/libfacter.dir/src/facts/solaris/uptime_resolver.cc.o type=FUNC);\r\nld: fatal: symbol 'long facter::util::solaris::k_stat_entry::value<long>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' is multiply-defined:\r\n        (file CMakeFiles/libfacter.dir/src/util/solaris/k_stat.cc.o type=FUNC; file CMakeFiles/libfacter.dir/src/facts/solaris/uptime_resolver.cc.o type=FUNC);\r\n","created_at":"2014-09-12T05:28:26Z","updated_at":"2014-09-12T05:28:26Z","html_url":"https://github.com/puppetlabs/cfacter/pull/126#discussion_r17463564","pull_request_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/17463564"},"html":{"href":"https://github.com/puppetlabs/cfacter/pull/126#discussion_r17463564"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126","id":21127951,"html_url":"https://github.com/puppetlabs/cfacter/pull/126","diff_url":"https://github.com/puppetlabs/cfacter/pull/126.diff","patch_url":"https://github.com/puppetlabs/cfacter/pull/126.patch","issue_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/126","number":126,"state":"open","locked":false,"title":"(CFACT-70) maintenance - refactor usage of kstat to a wrapper","user":{"login":"vrthra","id":70410,"avatar_url":"https://avatars.githubusercontent.com/u/70410?v=2","gravatar_id":"e691538fed1de0cc9b2f7cf1a0c11cb1","url":"https://api.github.com/users/vrthra","html_url":"https://github.com/vrthra","followers_url":"https://api.github.com/users/vrthra/followers","following_url":"https://api.github.com/users/vrthra/following{/other_user}","gists_url":"https://api.github.com/users/vrthra/gists{/gist_id}","starred_url":"https://api.github.com/users/vrthra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrthra/subscriptions","organizations_url":"https://api.github.com/users/vrthra/orgs","repos_url":"https://api.github.com/users/vrthra/repos","events_url":"https://api.github.com/users/vrthra/events{/privacy}","received_events_url":"https://api.github.com/users/vrthra/received_events","type":"User","site_admin":false},"body":"kstat APIs are used by solaris and other systems like free bsd to fetch kernel statistics. This patch refactors the kstat invocations into a simpler wrapper that handles both errors and data retrieval.","created_at":"2014-09-12T01:11:13Z","updated_at":"2014-09-12T05:28:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15be71abb009d631734e16fd7fb534df813e92e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/126/comments","statuses_url":"https://api.github.com/repos/puppetlabs/cfacter/statuses/bdb084f746679980c2ae4818cc337dd0ae023453","head":{"label":"vrthra:maint/kstat/solaris","ref":"maint/kstat/solaris","sha":"bdb084f746679980c2ae4818cc337dd0ae023453","user":{"login":"vrthra","id":70410,"avatar_url":"https://avatars.githubusercontent.com/u/70410?v=2","gravatar_id":"e691538fed1de0cc9b2f7cf1a0c11cb1","url":"https://api.github.com/users/vrthra","html_url":"https://github.com/vrthra","followers_url":"https://api.github.com/users/vrthra/followers","following_url":"https://api.github.com/users/vrthra/following{/other_user}","gists_url":"https://api.github.com/users/vrthra/gists{/gist_id}","starred_url":"https://api.github.com/users/vrthra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrthra/subscriptions","organizations_url":"https://api.github.com/users/vrthra/orgs","repos_url":"https://api.github.com/users/vrthra/repos","events_url":"https://api.github.com/users/vrthra/events{/privacy}","received_events_url":"https://api.github.com/users/vrthra/received_events","type":"User","site_admin":false},"repo":{"id":23197751,"name":"cfacter","full_name":"vrthra/cfacter","owner":{"login":"vrthra","id":70410,"avatar_url":"https://avatars.githubusercontent.com/u/70410?v=2","gravatar_id":"e691538fed1de0cc9b2f7cf1a0c11cb1","url":"https://api.github.com/users/vrthra","html_url":"https://github.com/vrthra","followers_url":"https://api.github.com/users/vrthra/followers","following_url":"https://api.github.com/users/vrthra/following{/other_user}","gists_url":"https://api.github.com/users/vrthra/gists{/gist_id}","starred_url":"https://api.github.com/users/vrthra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrthra/subscriptions","organizations_url":"https://api.github.com/users/vrthra/orgs","repos_url":"https://api.github.com/users/vrthra/repos","events_url":"https://api.github.com/users/vrthra/events{/privacy}","received_events_url":"https://api.github.com/users/vrthra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vrthra/cfacter","description":"Collect and display system facts from a C++ library.","fork":true,"url":"https://api.github.com/repos/vrthra/cfacter","forks_url":"https://api.github.com/repos/vrthra/cfacter/forks","keys_url":"https://api.github.com/repos/vrthra/cfacter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vrthra/cfacter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vrthra/cfacter/teams","hooks_url":"https://api.github.com/repos/vrthra/cfacter/hooks","issue_events_url":"https://api.github.com/repos/vrthra/cfacter/issues/events{/number}","events_url":"https://api.github.com/repos/vrthra/cfacter/events","assignees_url":"https://api.github.com/repos/vrthra/cfacter/assignees{/user}","branches_url":"https://api.github.com/repos/vrthra/cfacter/branches{/branch}","tags_url":"https://api.github.com/repos/vrthra/cfacter/tags","blobs_url":"https://api.github.com/repos/vrthra/cfacter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vrthra/cfacter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vrthra/cfacter/git/refs{/sha}","trees_url":"https://api.github.com/repos/vrthra/cfacter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vrthra/cfacter/statuses/{sha}","languages_url":"https://api.github.com/repos/vrthra/cfacter/languages","stargazers_url":"https://api.github.com/repos/vrthra/cfacter/stargazers","contributors_url":"https://api.github.com/repos/vrthra/cfacter/contributors","subscribers_url":"https://api.github.com/repos/vrthra/cfacter/subscribers","subscription_url":"https://api.github.com/repos/vrthra/cfacter/subscription","commits_url":"https://api.github.com/repos/vrthra/cfacter/commits{/sha}","git_commits_url":"https://api.github.com/repos/vrthra/cfacter/git/commits{/sha}","comments_url":"https://api.github.com/repos/vrthra/cfacter/comments{/number}","issue_comment_url":"https://api.github.com/repos/vrthra/cfacter/issues/comments/{number}","contents_url":"https://api.github.com/repos/vrthra/cfacter/contents/{+path}","compare_url":"https://api.github.com/repos/vrthra/cfacter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vrthra/cfacter/merges","archive_url":"https://api.github.com/repos/vrthra/cfacter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vrthra/cfacter/downloads","issues_url":"https://api.github.com/repos/vrthra/cfacter/issues{/number}","pulls_url":"https://api.github.com/repos/vrthra/cfacter/pulls{/number}","milestones_url":"https://api.github.com/repos/vrthra/cfacter/milestones{/number}","notifications_url":"https://api.github.com/repos/vrthra/cfacter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vrthra/cfacter/labels{/name}","releases_url":"https://api.github.com/repos/vrthra/cfacter/releases{/id}","created_at":"2014-08-21T18:12:18Z","updated_at":"2014-09-02T17:08:45Z","pushed_at":"2014-09-12T02:10:06Z","git_url":"git://github.com/vrthra/cfacter.git","ssh_url":"git@github.com:vrthra/cfacter.git","clone_url":"https://github.com/vrthra/cfacter.git","svn_url":"https://github.com/vrthra/cfacter","homepage":"https://tickets.puppetlabs.com/browse/CFACT","size":4681,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"fd016bf388912a2cc2d65939cdba0c5bb27c9144","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=2","gravatar_id":"eb454c2139c156db7c8266a875519a1f","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17602228,"name":"cfacter","full_name":"puppetlabs/cfacter","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=2","gravatar_id":"eb454c2139c156db7c8266a875519a1f","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/cfacter","description":"Collect and display system facts from a C++ library.","fork":false,"url":"https://api.github.com/repos/puppetlabs/cfacter","forks_url":"https://api.github.com/repos/puppetlabs/cfacter/forks","keys_url":"https://api.github.com/repos/puppetlabs/cfacter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/cfacter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/cfacter/teams","hooks_url":"https://api.github.com/repos/puppetlabs/cfacter/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/cfacter/events","assignees_url":"https://api.github.com/repos/puppetlabs/cfacter/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/cfacter/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/cfacter/tags","blobs_url":"https://api.github.com/repos/puppetlabs/cfacter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/cfacter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/cfacter/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/cfacter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/cfacter/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/cfacter/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/cfacter/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/cfacter/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/cfacter/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/cfacter/subscription","commits_url":"https://api.github.com/repos/puppetlabs/cfacter/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/cfacter/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/cfacter/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/cfacter/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/cfacter/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/cfacter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/cfacter/merges","archive_url":"https://api.github.com/repos/puppetlabs/cfacter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/cfacter/downloads","issues_url":"https://api.github.com/repos/puppetlabs/cfacter/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/cfacter/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/cfacter/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/cfacter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/cfacter/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/cfacter/releases{/id}","created_at":"2014-03-10T17:48:17Z","updated_at":"2014-09-09T16:14:19Z","pushed_at":"2014-09-12T04:19:01Z","git_url":"git://github.com/puppetlabs/cfacter.git","ssh_url":"git@github.com:puppetlabs/cfacter.git","clone_url":"https://github.com/puppetlabs/cfacter.git","svn_url":"https://github.com/puppetlabs/cfacter","homepage":"https://tickets.puppetlabs.com/browse/CFACT","size":79438,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":16,"mirror_url":null,"open_issues_count":4,"forks":16,"open_issues":4,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126"},"html":{"href":"https://github.com/puppetlabs/cfacter/pull/126"},"issue":{"href":"https://api.github.com/repos/puppetlabs/cfacter/issues/126"},"comments":{"href":"https://api.github.com/repos/puppetlabs/cfacter/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/cfacter/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/cfacter/statuses/bdb084f746679980c2ae4818cc337dd0ae023453"}}}}