Fix compilation of backend on getpeereid() enabled platforms
When getpeereid() is available in the platform we don't need it
from ports, always invoking it cause a compilation failure since
the object file will be missing. Fix by using the proper lookup
list from autoconf which will contain the list of required objs.
@@ -68,7 +68,11 @@ endif
LIBS := $(LIBS) -lpthread
# Greenplum uses libpq to communicate between QD and QEs
-OBJS := $(OBJS) $(addprefix $(top_builddir)/src/interfaces/libpq/,fe-protocol3_for_backend.o fe-connect_for_backend.o fe-exec.o pqexpbuffer.o fe-auth.o fe-misc.o fe-protocol2.o fe-secure.o getpeereid.o)
+OBJS += $(addprefix $(top_builddir)/src/interfaces/libpq/,fe-protocol3_for_backend.o fe-connect_for_backend.o fe-exec.o pqexpbuffer.o fe-auth.o fe-misc.o fe-protocol2.o fe-secure.o)
+
+ifneq ($(filter getpeereid.o,$(LIBOBJS)),)
+OBJS += $(addprefix $(top_builddir)/src/interfaces/libpq/,getpeereid.o)
+endif
##########################################################################
