<div dir="ltr">it's in librt, ie you need to add -lrt</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 3:20 PM, Clem Cole <span dir="ltr"><<a href="mailto:clemc@ccc.com" target="_blank">clemc@ccc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Cory,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hmm, the PWD 3.0/System V later Posix shm(2) functions I would have expected NetBSD to have picked up by now I agree.  But no matter, I believe you can use the mmap(2) mechanism if you want  shared memory in BSD post 4.4.  I wrote some code for a book chapter using it a long time ago.  Get a copy of Rago's update to Steven's APUE and I believe you find an example if not just google for mmap(2) examples.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Clem</div><span class="HOEnZb"><font color="#888888"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Clem</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 27, 2015 at 6:56 PM, Cory Smelosky <span dir="ltr"><<a href="mailto:b4@gewt.net" target="_blank">b4@gewt.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">csmelosky@green:~/simh gmake vax CFLAGS="-lrt"<br>
lib paths are: /usr/lib /usr/pkg/lib<br>
include paths are: /usr/include /usr/pkg/include<br>
using libm: /usr/lib/libm.so<br>
using librt: /usr/lib/librt.so<br>
using libpthread: /usr/lib/libpthread.so /usr/include/pthread.h<br>
using regex: /usr/include/regex.h<br>
using libdl: /usr/include/dlfcn.h<br>
*** Info ***<br>
*** Info *** The simulator you are building could provide more<br>
*** Info *** functionality if video support were available on your system.<br>
*** Info *** Install the development components of libSDL packaged by your<br>
*** Info *** operating system distribution and rebuild your simulator to<br>
*** Info *** enable this extra functionality.<br>
*** Info ***<br>
using libpcap: /usr/include/pcap.h<br>
***<br>
*** vax Simulator being built with:<br>
*** - compiler optimizations and no debugging support. GCC Version: 4.5.3.<br>
*** - dynamic networking support using NetBSD provided libpcap components.<br>
*** - Local LAN packet transports: PCAP TAP<br>
***<br>
*** git commit id is 041c866d67c4fa4a44f637b6372cb91aa7b15d86.<br>
***<br>
gcc -std=c99 -U__STRICT_ANSI__  -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -Wno-unused-result -DSIM_GIT_COMMIT_ID=041c866d67c4fa4a44f637b6372cb91aa7b15d86 -DSIM_COMPILER="GCC Version: 4.5.3" -I . -D_GNU_SOURCE -I/usr/pkg/include -DUSE_READER_THREAD -DSIM_ASYNCH_IO  -DHAVE_REGEX_H -DHAVE_DLOPEN=so -DHAVE_GLOB  sim_BuildROMs.c -o BIN/BuildROMs<br>
BIN/BuildROMs<br>
rm -f BIN/BuildROMs<br>
gcc -std=c99 -U__STRICT_ANSI__  -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -Wno-unused-result -DSIM_GIT_COMMIT_ID=041c866d67c4fa4a44f637b6372cb91aa7b15d86 -DSIM_COMPILER="GCC Version: 4.5.3" -I . -D_GNU_SOURCE -I/usr/pkg/include -DUSE_READER_THREAD -DSIM_ASYNCH_IO  -DHAVE_REGEX_H -DHAVE_DLOPEN=so -DHAVE_GLOB  VAX/vax_cpu.c VAX/vax_cpu1.c VAX/vax_fpa.c VAX/vax_io.c VAX/vax_cis.c VAX/vax_octa.c  VAX/vax_cmode.c VAX/vax_mmu.c VAX/vax_stddev.c VAX/vax_sysdev.c VAX/vax_sys.c  VAX/vax_syscm.c VAX/vax_syslist.c VAX/vax_vc.c VAX/vax_lk.c VAX/vax_vs.c VAX/vax_2681.c PDP11/pdp11_rl.c PDP11/pdp11_rq.c PDP11/pdp11_ts.c PDP11/pdp11_dz.c PDP11/pdp11_lp.c PDP11/pdp11_tq.c PDP11/pdp11_xq.c PDP11/pdp11_vh.c PDP11/pdp11_cr.c PDP11/pdp11_io_lib.c scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c sim_tmxr.c sim_ether.c sim_tape.c sim_disk.c sim_serial.c sim_video.c sim_imd.c -DVM_VAX -DUSE_INT64 -DUSE_ADDR64 -DUSE_SIM_VIDEO -I VAX -I PDP11 -DHAVE_PCAP_NETWORK -I/usr/include/ -DBPF_CONST_STRING -DUSE_SHARED -DHAVE_TAP_NETWORK -DHAVE_BSDTUNTAP   -o BIN/microvax3900 -L/usr/pkg/lib -R/usr/pkg/lib -lm -lrt -lpthread<br>
sim_fio.c: In function 'sim_shmem_open':<br>
sim_fio.c:470:1: warning: implicit declaration of function 'shm_open'<br>
/var/tmp//cca0Q6I4.o: In function `sim_shmem_open':<br>
sim_fio.c:(.text+0x5c0): undefined reference to `shm_open'<br>
sim_fio.c:(.text+0x64e): undefined reference to `shm_open'<br>
<br>
This is a bit of a problem.<span><font color="#888888"><br>
<br>
-- <br>
Cory Smelosky<br>
<a href="http://gewt.net" target="_blank">http://gewt.net</a> Personal stuff<br>
<a href="http://gimme-sympathy.org" target="_blank">http://gimme-sympathy.org</a> Projects<br>
_______________________________________________<br>
Simh mailing list<br>
<a href="mailto:Simh@trailing-edge.com" target="_blank">Simh@trailing-edge.com</a><br>
<a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" target="_blank">http://mailman.trailing-edge.com/mailman/listinfo/simh</a></font></span></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Simh mailing list<br>
<a href="mailto:Simh@trailing-edge.com">Simh@trailing-edge.com</a><br>
<a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" target="_blank">http://mailman.trailing-edge.com/mailman/listinfo/simh</a><br></blockquote></div><br></div>