diff --git a/prometheus/process_collector_procfs.go b/prometheus/process_collector_procfs.go
index <HASH>..<HASH> 100644
--- a/prometheus/process_collector_procfs.go
+++ b/prometheus/process_collector_procfs.go
@@ -11,7 +11,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// +build linux plan9 solaris
+// +build linux,cgo plan9,cgo solaris,cgo
 
 package prometheus
 
diff --git a/prometheus/process_collector_rest.go b/prometheus/process_collector_rest.go
index <HASH>..<HASH> 100644
--- a/prometheus/process_collector_rest.go
+++ b/prometheus/process_collector_rest.go
@@ -11,7 +11,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// +build !linux,!plan9,!solaris
+// +build !linux,!plan9,!solaris !cgo
 
 package prometheus
Remove procfs dependency unless cgo is enabled