<div dir="ltr">Even on Linux-Lab when I try to compile including &lt;bsd/string.h&gt; and using str_mode I get &quot;undefined reference&quot; error for str_mode. Am I supposed to be using any flags with gcc or something?<div>
<br></div><div>I installed libbsd-dev on my Ubuntu VM and I get the same error there. Undefined reference.</div><div><br></div><div>Any ideas?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 4:51 PM, Tejas Nadkarni <span dir="ltr">&lt;<a href="mailto:tnadkarn@stevens.edu" target="_blank">tnadkarn@stevens.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks. I usually do the work on a local Ubuntu VM because it&#39;s faster than Linux Lab. Rarely have issues because the OS is same but I guess different packages and configs. </p>
<div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Oct 7, 2013 4:48 PM, &quot;Jan Schaumann&quot; &lt;<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Tejas Nadkarni &lt;<a href="mailto:tnadkarn@stevens.edu" target="_blank">tnadkarn@stevens.edu</a>&gt; wrote:<br>
&gt; It&#39;s weird in the even on the manpage for strmode it doesn&#39;t reference A or<br>
&gt; a being returned for filetype.<br>
<br>
Correct.  A platform that does not support these file types may not<br>
mention them in its manual page.<br>
<br>
&gt; Also I don&#39;t appear to have the bsd/string.h on my system so will need to<br>
&gt; fix that. That&#39;s why since I already have a function written to parse<br>
&gt; st_mode I was hoping there was a value I could check for A or a.<br>
<br>
Well, if the platform supported this type, it&#39;d probably provide macros<br>
such as _S_ARCH1 an _S_ARCH2.  Your code would have to ifndef the<br>
relevant blocks around this to be portable, though.  So in the end,<br>
using strmode(3) is the best solution.<br>
<br>
This is also an example of why it&#39;s useful to develop your program on<br>
the same platform on which it is intended to run --<br>
<a href="http://linux-lab.cs.stevens.edu" target="_blank">linux-lab.cs.stevens.edu</a>, in this case.  The differences across unix<br>
variants can lead to frustrations otherwise.<br>
<br>
-Jan<br>
_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
</blockquote></div>
</div></div></blockquote></div><br></div>